-
Notifications
You must be signed in to change notification settings - Fork 39
/
tox.ini
40 lines (37 loc) · 1.01 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# TODO: implement doc linting
[tox]
envlist = py{38}-lint, py{38}-pytest, py{38}
source_dir = src/ephemeris
test_dir = tests
[testenv:py38-lint]
commands =
black --check {[tox]source_dir} {[tox]test_dir}
isort --check-only {[tox]source_dir} {[tox]test_dir}
ruff {[tox]source_dir} {[tox]test_dir}
flake8 {[tox]source_dir} {[tox]test_dir}
skip_install = True
deps =
black
isort
ruff
flake8
flake8-import-order
[testenv:py38-pytest]
deps =
-r requirements.txt
-r dev-requirements.txt
allowlist_externals =
sed
commands =
pytest -v --cov={envsitepackagesdir}/ephemeris --cov-report xml {[tox]test_dir}
# Replace the installed package directory by the source directory.
# This is needed for codacy to understand which files have coverage testing
# Unfortunately this has to run in the tox env to have access to envsitepackagesdir
sed -i 's|{envsitepackagesdir}|src|' coverage.xml
[testenv:mypy]
commands =
mypy -p ephemeris
deps =
mypy
types-PyYAML
types-requests