-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpyproject.toml
152 lines (131 loc) · 4.07 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
[build-system]
requires = ["setuptools", "lsst-versions"]
build-backend = "setuptools.build_meta"
[project]
name = "astro-metadata-translator"
requires-python = ">=3.10.0"
description = "A translator for astronomical metadata."
license = {text = "BSD 3-Clause License"}
authors = [
{name="Rubin Observatory Data Management", email="[email protected]"},
]
readme = "README.md"
classifiers = [
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Astronomy",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
]
keywords = ["lsst"]
dynamic = ["version"]
dependencies = [
"astropy >=3.0.5",
"pyyaml >=3.13",
"click >= 8"
]
[project.optional-dependencies]
test = [
"pytest"
]
[project.urls]
"Homepage" = "https://github.com/lsst/astro_metadata_translator"
[project.scripts]
astrometadata = "astro_metadata_translator.cli.astrometadata:main"
[tool.setuptools]
zip-safe = true
license-files = ["LICENSE"]
[tool.setuptools.packages.find]
where = ["python"]
[tool.setuptools.package-data]
astro_metadata_translator = ["corrections/*/*.yaml", "corrections/*/*.md", "py.typed"]
[tool.setuptools.dynamic]
version = { attr = "lsst_versions.get_lsst_version" }
[tool.black]
line-length = 110
target-version = ["py311"]
[tool.isort]
profile = "black"
line_length = 110
known_first_party = ["astro_metadata_translator"]
[tool.lsst_versions]
write_to = "python/astro_metadata_translator/version.py"
[tool.pytest.ini_options]
addopts = "--import-mode=importlib" # Recommended as best practice
[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.
# D104 - we do not require documentation in __init__.py files.
add-ignore = ["D107", "D105", "D102", "D104", "D100", "D200", "D205", "D400"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.ruff]
target-version = "py311"
line-length = 110
exclude = [
"__init__.py",
]
[tool.ruff.lint]
ignore = [
"N999", # Invalid module name
"D107", # Document __init__ at class level.
"D105", # Do not require docstrings on magic methods.
"D102", # Can inherit docstrings.
"D100", # Modules are not required to include documentation.
"D205", # Does not understand if a summary is two lines long.
]
select = [
"E", # pycodestyle
"F", # pyflakes
"N", # pep8-naming
"W", # pycodestyle
"D", # pydocstyle
"I", # isort
"RUF022", # sort __all__
"UP", # pyupgrade
"B", # bugbear
]
extend-select = [
"RUF100", # Warn about unused noqa
]
[tool.ruff.lint.isort]
known-first-party = ["astro_metadata_translator"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 79
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
docstring-code-format = true
# Formatter does not know about indenting.
docstring-code-line-length = 69
[tool.numpydoc_validation]
checks = [
"all", # All except the rules listed below.
"SA01", # See Also section.
"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 = [
'^astrometadata\.' # CLI does not conform to numpydoc
]