-
Notifications
You must be signed in to change notification settings - Fork 21
/
tox.ini
118 lines (109 loc) · 2.75 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[tox]
skip_missing_interpreters = true
envlist =
clean
check
docs
py{3.8,3.9,3.10,3.11}-{pip}
minversion = 3.8.0
[testenv]
changedir = tests
deps =
pooch
pytest
pytest-cov
Cython>=0.23
commands =
python -V
pip freeze --all
python -c "import numpy; numpy.show_config()"
# --cov should generate `Coverage` data
pytest --durations=50 --cov=aspire --cov-report=xml {posargs}
[testenv:docs]
changedir = docs
deps =
sphinx
sphinxcontrib-bibtex
sphinx-rtd-theme
commands =
sphinx-apidoc -f -o ./source ../src -H Modules
[testenv:check]
changedir = {toxinidir}
deps =
black
check-manifest
flake8
flake8-bugbear
flake8-colors
flake8-print
# TODO, fix more flake8 issues
# flake8-bandit
# flake8-builtins
# flake8-commas
# flake8-comprehensions
# flake8-docstrings
# flake8-use-fstring
# pep8-naming
# TODO, add pydocstyle or equivalent
isort
twine
skip_install = true
commands =
flake8 .
isort --check-only --diff .
black --check --diff .
python docs/check_docstrings.py src/aspire
python -m json.tool .zenodo.json /dev/null
check-manifest .
python -m build
twine check dist/*.*
[flake8]
# The following for recomended for use with Black
max-line-length = 88
extend-ignore = E203, E501
per-file-ignores =
__init__.py: F401
gallery/tutorials/aspire_introduction.py: T201, F401, E402
gallery/tutorials/configuration.py: T201, E402
gallery/tutorials/pipeline_demo.py: T201
gallery/tutorials/turorials/data_downloader.py: E402
gallery/tutorials/tutorials/ctf.py: T201, E402
gallery/tutorials/tutorials/image_class.py: T201
gallery/tutorials/tutorials/micrograph_source.py: T201, E402
gallery/tutorials/tutorials/weighted_volume_estimation.py: T201, E402
gallery/tutorials/tutorials/relion_projection_interop.py: T201
# Ignore Sphinx gallery builds
docs/build/html/_downloads/*/*.py: T201, E402, F401, E265
docs/source/auto*/*.py: T201, E402, F401, E265
docs/source/auto*/*/*.py: T201, E402, F401, E265
[isort]
default_section = THIRDPARTY
known_first_party = aspire
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
# The following is suggested for Black
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
ensure_newline_before_comments = True
line_length = 88
[pytest]
testpaths = tests
markers =
expensive: mark a test as a long running test.
addopts = -m "not expensive"
[gh-actions]
python =
3.8: py3.8
3.9: py3.9
3.10: py3.10
3.11: py3.11
[coverage:run]
relative_files = True
omit =
*/debug*.py
# This is more/less a copy of scikit-learn's with minor changes.
src/aspire/numeric/complex_pca/validation.py
[check-manifest]
ignore =
debug*.py