-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
230 lines (204 loc) · 6.15 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
[project]
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
name = "lsst-cm-service"
description = "Rubin Observatory campaign management FastAPI service"
license = { file = "LICENSE" }
readme = "README.md"
keywords = ["rubin", "lsst"]
# https://pypi.org/classifiers/
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: POSIX",
"Typing :: Typed",
]
requires-python = ">=3.11"
dynamic = ["version"]
dependencies = [
"alembic==1.14.*",
"asyncpg==0.30.*",
"click==8.1.*",
"fastapi==0.115.*",
"greenlet==3.1.*",
"htcondor==24.0.2; sys_platform == 'linux'",
"jinja2==3.1.*",
"lsst-ctrl-bps>=28.2024.5000",
"lsst-ctrl-bps-htcondor>=28.2024.5000; sys_platform == 'linux'",
"lsst-ctrl-bps-panda>=28.2024.5000",
"lsst-daf-butler>=28.2024.5000",
"lsst-pipe-base>=28.2024.5000",
"numpy==2.1.*",
"pause==0.3.*",
"psycopg2-binary==2.9.*",
"pydantic==2.10.*",
"pydantic-settings==2.6.*",
"python-multipart==0.0.*",
"starlette==0.41.*",
"structlog==24.4.*",
"tabulate==0.9.*",
"sqlalchemy[asyncio]==2.0.*",
"safir[db]==7.0.*",
"uvicorn[standard]==0.32.*",
]
[dependency-groups]
dev = [
"aiosqlite>=0.20.0",
"asgi-lifespan>=2.1.0",
"coverage[toml]>=7.6.7",
"greenlet>=3.1.1",
"httpx>=0.27.2",
"mypy>=1.13.0",
"pre-commit>=4.0.1",
"pytest>=8.3.3",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.0.0",
"pytest-playwright>=0.5.2",
"pytest-timeout>=2.3.1",
"ruff>=0.7.4",
"python-semantic-release==9.14.*",
"sqlalchemy[mypy]>=2.0.36",
"types-pyyaml>=6.0.12.20240917",
"types-tabulate>=0.9.0.20240106",
]
[project.scripts]
cm-service = "lsst.cmservice.cli.server:server"
cm-client = "lsst.cmservice.cli.client:client_top"
[project.urls]
Homepage = "https://cm-service.lsst.io"
Source = "https://github.com/lsst-dm/cm-service"
[tool.uv]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/lsst"]
[tool.hatch.version]
path = "src/lsst/cmservice/__init__.py"
fallback-version = "0.0.0"
[tool.coverage.run]
parallel = true
branch = true
source = ["lsst.cmservice"]
concurrency = ['greenlet', 'thread']
[tool.coverage.paths]
source = ["src"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"except Exception as msg",
"except KeyError as msg",
"except IntegrityError as msg",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.ruff]
exclude = [
"__init__.py",
]
line-length = 110
target-version = "py311"
[tool.ruff.lint]
ignore = [
"COM812", # missing-trailing-comma
"N802", # invalid-function-name
"N803", # invalid-argument-name
"N806", # non-lowercase-variable-in-function
"N812", # lowercase-imported-as-non-lowercase
"N813", # camelcase-imported-as-constant
"N815", # mixed-case-variable-in-class-scope
"N816", # mixed-case-variable-in-global-scope
]
select = [
"E", # pycodestyle
"F", # pyflakes
"N", # pep8-naming
"W", # pycodestyle
"COM", # pyflakes-commas
"FBT", # flake8-boolean-trap
"UP", # pyupgrade
]
extend-select = [
"RUF100", # Warn about unused noqa
]
[tool.ruff.lint.isort]
known-first-party = ["lsst", "tests"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 79
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.pytest.ini_options]
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope="function"
# The python_files setting is not for test detection (pytest will pick up any
# test files named *_test.py without this setting) but to enable special
# assert processing in any non-test supporting files under tests. We
# conventionally put test support functions under tests.support and may
# sometimes use assert in test fixtures in conftest.py, and pytest only
# enables magical assert processing (showing a full diff on assert failures
# with complex data structures rather than only the assert message) in files
# listed in python_files.
python_files = ["tests/*.py", "tests/*/*.py"]
[tool.mypy]
disallow_untyped_defs = true
disallow_incomplete_defs = true
ignore_missing_imports = true
local_partial_types = true
no_implicit_reexport = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true
plugins = ["sqlalchemy.ext.mypy.plugin", "pydantic.mypy"]
[tool.pydocstyle]
convention = "numpy"
add_select = [
"D212" # Multi-line docstring summary should start at the first line
]
add-ignore = [
"D105", # Missing docstring in magic method
"D102", # Missing docstring in public method (needed for docstring inheritance)
"D100", # Missing docstring in public module
# Below are required to allow multi-line summaries.
"D200", # One-line docstring should fit on one line with quotes
"D205", # 1 blank line required between summary line and description
"D400", # First line should end with a period
# Properties shouldn't be written in imperative mode. This will be fixed
# post 6.1.1, see https://github.com/PyCQA/pydocstyle/pull/546
"D401",
# To avoid all the pydantic config class giving errors
"D106",
]
[tool.semantic_release]
version_variables = ["src/lsst/cmservice/__init__.py:__version__"]
commit_author = {env = "GIT_COMMIT_AUTHOR"}
tag_format = "{version}"
[tool.semantic_release.branches.main]
match = "main"
prerelease = false
[tool.semantic_release.branches.ticket]
match = "^tickets/DM-\\d+(.*)$"
prerelease_token = "rc"
prerelease = true
[tool.semantic_release.branches.user]
match = "^u/(.*)/(.*)$"
prerelease_token = "alpha"
prerelease = true
[tool.semantic_release.changelog]
[tool.semantic_release.publish]
upload_to_vcs_release = false
[tool.semantic_release.remote]
name = "origin"
type = "github"