-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathsetup.cfg
98 lines (89 loc) · 3.01 KB
/
setup.cfg
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
[metadata]
# This includes the license file(s) in the wheel.
# https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file
license_files = LICENSE
[versioneer]
VCS = git
style = pep440
versionfile_source = desc/_version.py
versionfile_build = desc/_version.py
tag_prefix = v
parentdir_prefix = desc-
[coverage:run]
# Settings to control coverage.py or pytest with coverage flags: "--cov" (requires pytest-cov)
# we only care about the coverage of the source itself
# otherwise it measures coverage of the tests themselves as well
source =
desc/
# _version.py is generated code, no need to count it
omit =
desc/_version.py
desc/examples/precise_QH.py
desc/examples/precise_QA.py
desc/examples/reactor_QA.py
desc/examples/regenerate_all_equilibria.py
[coverage:report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
if __name__ == .__main__.:
ignore_errors = True
[tool:pytest]
markers=
unit: marks small unit tests
regression: marks end to end regression tests
solve: marks tests that rely solving an equilibrium
optimize : marks tests that perform an optimization
slow: marks tests as slow (deselect with 'pytest -m "not slow"').
fast: mark tests as fast.
filterwarnings=
error
ignore::pytest.PytestUnraisableExceptionWarning
# Ignore division by inf warning when trust radius is set to infinite
ignore:invalid value encountered in scalar divide:RuntimeWarning:desc.optimize
# ignore benign Cython warnings on ndarray size
ignore:numpy.ndarray size changed:RuntimeWarning
# ignore DeprecationWarnings from dependency packages
ignore::DeprecationWarning:(?!desc)
[flake8]
# Primarily ignoring whitespace, indentation, and commenting etiquette that black does not catch
# These will be fixed in a code-cleaning branch in the future
ignore =
# Let black handle whitespace line breaks and stuff like that
E1, E2, W503, W504, W505,
# multiline statements are ok sometimes
E704,
# lambda expressions are useful
E731,
# variable names like "l" are pretty common for mode numbers
E741,
# don't want to always use "imperative mood" in docstrings
D401,
# don't care about docstrings in __dunder__ methods
D105,
per-file-ignores =
# need to import things to top level even if they aren't used there
desc/*/__init__.py: F401
# too many long lines to deal with now
desc/compute/data_index.py: E501
# need imports in weird order for selecting device before benchmarks
tests/benchmarks/benchmark*.py: E402
# stop complaining about setting gpu before import other desc stuff
desc/examples/precise_QA.py: E402
desc/examples/precise_QH.py: E402
desc/examples/reactor_QA.py: E402
max-line-length = 88
exclude =
docs/*
devtools/*
build/*
local/*
publications/*
.git/*
versioneer.py
max-complexity = 15
docstring-convention = numpy
[isort]
profile=black
src_paths=desc,test