Two small comments inline

Diff comments:

> diff --git a/tox.ini b/tox.ini
> new file mode 100644
> index 0000000..f3d518c
> --- /dev/null
> +++ b/tox.ini
> @@ -0,0 +1,47 @@
> +[tox]
> +skipsdist=True
> +envlist = unit, functional
> +skip_missing_interpreters = True

We can remove this per some review feedback on other charms from stub "The 
setting doesn't really make sense for this use case, and should be left on the 
default (False). Otherwise the tests will pass if Python3 is not installed, 
which would be weird."

> +
> +[testenv]
> +basepython = python3
> +setenv =
> +  PYTHONPATH = {toxinidir}/build/lib:{toxinidir}/build/venv
> +
> +[testenv:unit]
> +commands =
> +    pytest --ignore mod --ignore {toxinidir}/tests/functional \
> +      {posargs:-v  --cov=src --cov-report=term-missing --cov-branch}
> +deps = -r{toxinidir}/tests/unit/requirements.txt
> +       -r{toxinidir}/requirements.txt
> +setenv =
> +  PYTHONPATH={toxinidir}/src:{toxinidir}/build/lib:{toxinidir}/build/venv
> +  TZ=UTC
> +
> +[testenv:functional]
> +passenv =
> +  HOME
> +  JUJU_REPOSITORY
> +  PATH
> +commands =
> +     pytest -v --ignore mod --ignore {toxinidir}/tests/unit {posargs}
> +deps = -r{toxinidir}/tests/functional/requirements.txt
> +       -r{toxinidir}/requirements.txt
> +
> +[testenv:black]
> +commands = black --skip-string-normalization --line-length=120 src/ tests/

We should move the options here to a file called pyproject.toml so setting can 
be picked up by editors.

> +deps = black
> +
> +[testenv:lint]
> +commands = flake8 src/ tests/
> +# Pin flake8 to 3.7.9 to match focal
> +deps =
> +    flake8==3.7.9
> +
> +[flake8]
> +exclude =
> +    .git,
> +    __pycache__,
> +    .tox,
> +max-line-length = 120
> +max-complexity = 10


-- 
https://code.launchpad.net/~barryprice/charm-k8s-bind/+git/charm-k8s-bind/+merge/387828
Your team Bind Charmers is requested to review the proposed merge of 
~barryprice/charm-k8s-bind/+git/charm-k8s-bind:master into 
charm-k8s-bind:master.

-- 
Mailing list: https://launchpad.net/~bind-charmers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~bind-charmers
More help   : https://help.launchpad.net/ListHelp

Reply via email to