-
Notifications
You must be signed in to change notification settings - Fork 14
/
pyproject.toml
238 lines (210 loc) · 6.42 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
[build-system]
requires = ["setuptools", "lsst-versions >= 1.3.0"]
build-backend = "setuptools.build_meta"
[project]
name = "lsst-daf-butler"
requires-python = ">=3.11.0"
description = "An abstraction layer for reading and writing astronomical data to datastores."
license = {text = "BSD 3-Clause License"}
readme = "README.md"
authors = [
{name="Rubin Observatory Data Management", email="dm-admin@lists.lsst.org"},
]
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Astronomy",
]
keywords = ["lsst"]
dependencies = [
"astropy >=4.0",
"pyyaml >=5.1",
"sqlalchemy >=1.4",
"click >= 7.0",
"lsst-sphgeom",
"lsst-utils",
"lsst-resources",
"lsst-daf-relation",
"deprecated >= 1.2",
"pydantic >=2,<3.0",
"pyarrow >= 0.16",
"numpy",
]
dynamic = ["version"]
[project.urls]
"Homepage" = "https://github.com/lsst/daf_butler"
[project.optional-dependencies]
postgres = ["psycopg2"]
remote = [
"httpx",
# RemoteButler always uses HTTPS URLs for accessing files in the Datastore,
# so we need resources to have HTTPS support.
"lsst-resources[https]"
]
server = [
"fastapi",
"safir >= 3.4.0"
]
test = [
"pytest >= 3.2",
"numpy >= 1.17",
"matplotlib >= 3.0.3",
"pandas >= 1.0",
]
# Also expose the optional dependencies of lsst-resources as optional
# dependencies of lsst-daf-butler. lsst-daf-butler itself doesn't care what
# resource methods are available, but the client of lsst-daf-butler may view
# it as a black box and lsst-resources as an internal implementation detail,
# and therefore may find it more logical to specify optional dependencies
# here.
s3 = ["lsst-resources[s3]"]
https = ["lsst-resources[https]"]
gs = ["lsst-resources[gs]"]
[tool.setuptools.packages.find]
where = ["python"]
[tool.setuptools]
zip-safe = true
license-files = ["COPYRIGHT", "LICENSE", "bsd_license.txt", "gpl-v3.0.txt"]
[tool.setuptools.package-data]
"lsst.daf.butler" = ["py.typed", "configs/*.yaml", "configs/*/*.yaml"]
[tool.setuptools.dynamic]
version = { attr = "lsst_versions.get_lsst_version" }
[project.scripts]
butler = "lsst.daf.butler.cli.butler:main"
[tool.towncrier]
package = "lsst.daf.butler"
package_dir = "python"
filename = "doc/lsst.daf.butler/CHANGES.rst"
directory = "doc/changes"
title_format = "Butler {version} {project_date}"
issue_format = "`{issue} <https://rubinobs.atlassian.net/browse/{issue}>`_"
[[tool.towncrier.type]]
directory = "feature"
name = "New Features"
showcontent = true
[[tool.towncrier.type]]
directory = "api"
name = "API Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug Fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "perf"
name = "Performance Enhancement"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Other Changes and Additions"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "An API Removal or Deprecation"
showcontent = true
[tool.black]
line-length = 110
target-version = ["py311"]
[tool.isort]
profile = "black"
line_length = 110
[tool.lsst_versions]
write_to = "python/lsst/daf/butler/version.py"
[tool.pytest.ini_options]
# These require additional environment setup that isn't available during
# normal unit test runs
addopts = "--ignore=tests_integration"
[tool.pydocstyle]
convention = "numpy"
# Our coding style does not require docstrings for magic methods (D105)
# Our docstyle documents __init__ at the class level (D107)
# We allow methods to inherit docstrings and this is not compatible with D102.
# Docstring at the very first line is not required
# D200, D205 and D400 all complain if the first sentence of the docstring does
# not fit on one line. We do not require docstrings in __init__ files (D104).
add-ignore = ["D107", "D105", "D102", "D100", "D200", "D205", "D400", "D104"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.ruff]
line-length = 110
target-version = "py311"
exclude = [
"__init__.py",
"lex.py",
"yacc.py",
]
[tool.ruff.lint]
ignore = [
"N802",
"N803",
"N806",
"N812",
"N815",
"N816",
"N999",
"D107",
"D105",
"D102",
"D104",
"D100",
"D200",
"D205",
"D400",
"UP007", # Allow UNION in type annotation
]
select = [
"E", # pycodestyle
"F", # pycodestyle
"N", # pep8-naming
"W", # pycodestyle
"D", # pydocstyle
"UP", # pyupgrade
]
# Commented out to suppress "unused noqa" in jenkins which has older ruff not
# generating E721.
#extend-select = [
# "RUF100", # Warn about unused noqa
#]
[tool.ruff.lint.per-file-ignores]
# parserYacc docstrings can not be fixed. Docstrings are used to define grammar.
"python/lsst/daf/butler/registry/queries/expressions/parser/parserYacc.py" = ["D401", "D403"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 79
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.numpydoc_validation]
checks = [
"all", # All except the rules listed below.
"SA01", # See Also section.
"SA04", # We don't use descriptions with See Also.
"EX01", # Example section.
"SS06", # Summary can go into second line.
"GL01", # Summary text can start on same line as """
"GL08", # Do not require docstring.
"ES01", # No extended summary required.
"RT01", # Unfortunately our @property trigger this.
"RT02", # Does not want named return value. DM style says we do.
"SS05", # pydocstyle is better at finding infinitive verb.
]
exclude = [
"^test_.*", # Do not test docstrings in test code.
'^spatial\..*', # Do not test doc strings in the spatial.py test code.
'^lex\..*', # Lexer
'^parserLex\.', # Docstrings are not numpydoc
'^parserYacc\.', # Docstrings are not numpydoc
'^commands\.', # Click docstrings, not numpydoc
'butler.cli$', # This is the main click command
'^__init__$',
'\._[a-zA-Z_]+$', # Private methods.
]