forked from spacetelescope/stpipe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
171 lines (154 loc) · 4.38 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
[project]
name = 'stpipe'
description = 'Framework for calibration pipeline software'
readme = 'README.md'
requires-python = '>=3.9'
license = { file = 'LICENSE' }
authors = [{ name = 'STScI', email = '[email protected]' }]
classifiers = [
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Astronomy',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
]
dependencies = [
'asdf>=2.13',
'crds>=7.4.1.3',
'astropy>=5.0.4',
'importlib_metadata>=4.11.4',
]
dynamic = ['version']
[project.optional-dependencies]
docs = [
'numpydoc',
'sphinx',
'sphinx-automodapi',
'sphinx-rtd-theme',
'stsci-rtd-theme',
'tomli; python_version <"3.11"',
]
test = [
'pytest >=7.0.0',
'pytest-doctestplus >=0.10.0',
]
[project.urls]
'repository' = 'https://github.com/spacetelescope/stpipe'
'tracker' = 'https://github.com/spacetelescope/stpipe/issues'
[project.entry-points]
'asdf.resource_mappings' = {stpipe = 'stpipe.integration:get_resource_mappings'}
[project.scripts]
stpipe = 'stpipe.cli.main:main'
strun = 'stpipe.cli.strun:main'
[build-system]
requires = [
'setuptools >=61',
'setuptools_scm[toml] >=3.4',
]
build-backend = 'setuptools.build_meta'
[tool.setuptools_scm]
write_to = "src/stpipe/_version.py"
[tool.setuptools]
zip-safe = true
[tool.setuptools.packages.find]
where = ['src']
[tool.pytest.ini_options]
minversion = 6
log_cli_level = "INFO"
xfail_strict = true
doctest_plus = true
doctest_rst = true
text_file_format = 'rst'
addopts = [
"--strict-config",
"--strict-markers",
"-ra",
"--color=yes"
]
testpaths = [
'tests',
]
filterwarnings = [
"error::ResourceWarning",
]
markers = [
"soctests",
]
[tool.ruff]
src = [
"src",
"tests",
"docs",
"setup.py",
]
line-length = 88
extend-exclude = [
'docs',
'scripts/strun',
]
[tool.ruff.lint]
extend-select = [
'F', # Pyflakes
'W', 'E', # pycodestyle
'I', # isort
'N', # pep8-naming
'UP', # pyupgrade
'S', # flake8-bandit
# 'BLE', # flake8-blind-except
'B', # flake8-bugbear
'A', # flake8-builtins (prevent shadowing of builtins)
'C4', # flake8-comprehensions (best practices for comprehensions)
'T10', # flake8-debugger (prevent debugger statements in code)
'ISC', # flake8-implicit-str-concat (prevent implicit string concat)
'ICN', # flake8-import-conventions (enforce import conventions)
'INP', # flake8-no-pep420 (prevent use of PEP420, i.e. implicit name spaces)
'G', # flake8-logging-format (best practices for logging)
'PIE', # flake8-pie (misc suggested improvement linting)
'T20', # flake8-print (prevent print statements in code)
'PT', # flake8-pytest-style (best practices for pytest)
'Q', # flake8-quotes (best practices for quotes)
'RSE', # flake8-raise (best practices for raising exceptions)
'RET', # flake8-return (best practices for return statements)
# 'SLF', # flake8-self (prevent private member access)
'TID', # flake8-tidy-imports (prevent banned api and best import practices)
'INT', # flake8-gettext (when to use printf style strings)
'ARG', # flake8-unused-arguments (prevent unused arguments)
# 'PTH', # flake8-use-pathlib (prefer pathlib over os.path)
'ERA', # eradicate (remove commented out code)
'PGH', # pygrep (simple grep checks)
# 'PL', # pylint (general linting, flake8 alternative)
'FLY', # flynt (f-string conversion where possible)
'NPY', # NumPy-specific checks (recommendations from NumPy)
'PERF', # Perflint (performance linting)
'RUF', # ruff specific checks
]
ignore = [
"ISC001", # conflicts with ruff formatter
]
[tool.ruff.lint.extend-per-file-ignores]
"tests/*.py" = ["S101", "S603", "S607", "INP001", "ARG001"]
"src/stpipe/tests/*.py" = ["S101"]
"src/stpipe/cli/*.py" = ["T201"]
"src/stpipe/cmdline.py" = ["T201"]
[tool.black]
line-length = 88
force-exclude = '''
^/(
(
\.eggs
| \.git
| \.pytest_cache
| \.tox
)/
)
'''
[tool.codespell]
skip="*.pdf,*.fits,*.asdf,.tox,build,./tags,.git,docs/_build"
# ignore-words-list="""
# """
[tool.repo-review]
ignore = [
"GH200", # Use dependabot
"PC140", # add MyPy to pre-commit
"PC901", # custom pre-comit.ci message
"MY100", # Use MyPy
]