-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathtox.ini
More file actions
33 lines (32 loc) · 1.07 KB
/
tox.ini
File metadata and controls
33 lines (32 loc) · 1.07 KB
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
# TODO: implement doc linting
[tox]
envlist = lint, pytest, mypy
source_dir = src/ephemeris
test_dir = tests
[testenv]
commands =
lint: black --check {[tox]source_dir} {[tox]test_dir}
lint: isort --check-only {[tox]source_dir} {[tox]test_dir}
lint: ruff check {[tox]source_dir} {[tox]test_dir}
lint: flake8 {[tox]source_dir} {[tox]test_dir}
mypy: mypy {[tox]source_dir}
pytest: 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
pytest: sed -i 's|{envsitepackagesdir}|src|' coverage.xml
deps =
lint: black
lint: isort
lint: ruff
lint: flake8
lint: flake8-import-order
mypy: mypy
mypy: types-PyYAML
mypy: types-requests
mypy,pytest: -r requirements.txt
pytest: -r dev-requirements.txt
allowlist_externals =
pytest: sed
skip_install =
lint,mypy: True