-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
84 lines (77 loc) · 2.21 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
[tox]
isolated_build = True
envlist = ci
[testenv]
allowlist_externals =
bash
coverage
sphinx-build
twine
# shared directory for re-used packages
envdir = {toxinidir}/.env_tox
passenv =
CI
CONDA_PREFIX
GITHUB_*
ZENODO_*
GOOGLE_*
GCLOUD_*
GCP_*
HOME
SQLALCHEMY_WARN_20
EPACEMS_API_KEY
covargs = --cov={envsitepackagesdir}/pudl_archiver --cov-append --cov-report=xml
covreport = coverage report --sort=cover
#######################################################################################
# Code and Documentation Linters
#######################################################################################
[testenv:ruff]
description = Run the ruff linter on the whole repo
skip_install = false
extras =
tests
commands =
ruff check ./
[testenv:pre_commit]
description = Run git pre-commit hooks not covered by the other linters.
skip_install = false
extras =
tests
commands =
pre-commit run --all-files --show-diff-on-failure check-merge-conflict
pre-commit run --all-files --show-diff-on-failure check-yaml
pre-commit run --all-files --show-diff-on-failure check-case-conflict
pre-commit run --all-files --show-diff-on-failure debug-statements
pre-commit run --all-files --show-diff-on-failure name-tests-test
[testenv:linters]
description = Run the pre-commit and ruff linters.
skip_install = false
extras =
{[testenv:pre_commit]extras}
{[testenv:ruff]extras}
commands =
{[testenv:pre_commit]commands}
{[testenv:ruff]commands}
#######################################################################################
# Test the code
#######################################################################################
[testenv:unit]
description = Run all the software unit tests.
extras =
tests
commands =
pytest {posargs} {[testenv]covargs} \
--doctest-modules {envsitepackagesdir}/pudl_archiver \
tests
[testenv:ci]
description = Run all continuous integration (CI) checks & generate test coverage.
skip_install = false
recreate = true
extras =
{[testenv:linters]extras}
{[testenv:unit]extras}
commands =
coverage erase
{[testenv:linters]commands}
{[testenv:unit]commands}
{[testenv]covreport}