-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
146 lines (133 loc) · 3.52 KB
/
pyproject.toml
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
[project]
name = "minimum-dependencies"
description = "Get the minimum dependencies of a Python package"
readme = 'README.rst'
license = { file = 'LICENSE' }
authors = [{ name = 'William Jamieson', email = '[email protected]' }]
requires-python = '>=3.9'
classifiers = [
'Development Status :: 5 - Production/Stable',
"License :: OSI Approved :: BSD License",
'Programming Language :: Python',
"Programming Language :: Python :: 3 :: Only",
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
"Programming Language :: Python :: 3.12",
]
dynamic = [
'version',
]
dependencies = [
"importlib-metadata>=4.11.4; python_version < '3.11'",
"packaging>=23",
"requests>=2.25",
]
[project.optional-dependencies]
test = [
"pytest>=6",
"pytest-doctestplus>=0.12",
]
testing_no_exist = [
# These are for testing purposes only
"numpy>=999.999.999",
]
testing_no_pin = [
# These are for testing purposes only
"numpy",
]
testing_other = [
# These are for testing purposes only
"astropy[all]>=5",
"numpy>=1.20",
"scipy>=1.6",
]
testing_url = [
# These are for testing purposes only
"jwst[test]@ git+https://github.com/spacetelescope/jwst.git@master",
"stdatamodels@ git+https://github.com/spacetelescope/stdatamodels.git@master",
]
[project.scripts]
minimum_dependencies = 'minimum_dependencies._script:main'
[build-system]
build-backend = 'setuptools.build_meta'
requires = [
"setuptools>=60",
"setuptools_scm[toml]>=3.4",
]
[tool.setuptools.packages.find]
where = ['src']
[tool.setuptools_scm]
write_to = "src/minimum_dependencies/_version.py"
[tool.repo-review]
ignore = [
"PY004", # Ignore requiring docs (this is a very simple tool)
"PC901", # Ignore custom pre-commit message
"RTD", # Ignore using RTD (this is a very simple tool)
]
[tool.ruff]
src = ["src"]
exclude = [
".eggs",
".git",
".pytest_cache",
".tox",
"build",
"dist",
]
line-length = 88
[tool.ruff.lint]
select = ["ALL"]
[tool.ruff.lint.per-file-ignores]
"test_*.py" = ["S101", "ANN"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.isort]
[tool.mypy]
files = "src"
exclude = [
"src/minimum_dependencies/tests/"
]
python_version = "3.9"
strict = true
hide_error_codes = false
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
[tool.pytest.ini_options]
testpaths = ['src', 'README.rst']
minversion = 6
norecursedirs = ['build']
log_cli_level = "INFO"
xfail_strict = true
doctest_plus = 'enabled'
filterwarnings = [
'error',
'ignore:numpy.ndarray size changed:RuntimeWarning',
]
# Configuration for pytest-doctestplus
text_file_format = 'rst'
addopts = [
"-ra", # print summary of fails/errors
"--color=yes", # default to colorizing test output if possible
"--doctest-rst", # enable doc testing
"--strict-config", # ensure all config options are applicable
"--strict-markers", # ensure all markers are valid and defined
]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
'pragma: no cover',
# Don't complain about packages we have installed
'except ImportError',
# Don't complain if tests don't hit assertions
'raise AssertionError',
'raise NotImplementedError',
# Don't complain about script hooks
'def main\(.*\):',
# Ignore branches that don't pertain to this version of Python
'pragma: py{ ignore_python_version }',
]
[tool.codespell]
skip="*.pdf,.tox,build,./tags,.git"
# ignore-words-list="""
# """