-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
139 lines (126 loc) · 3.99 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
[project]
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
name = "vo-cutouts"
description = "Image cutout service for the Rubin Science Platform."
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.12",
"Natural Language :: English",
"Operating System :: POSIX",
"Typing :: Typed",
]
# vo-cutouts really requires Python 3.12, but the backend worker runs on
# Python 3.11 currently (2024-06-05) due to the stack container and we need to
# be able to install vo-cutouts there so that we can use supporting code.
requires-python = ">=3.11"
dependencies = [
"astropy",
"fastapi>=0.100",
"pydantic>2",
"pydantic-settings",
"safir[uws]>=9.0.1",
"structlog",
"uvicorn[standard]",
"vo-models>=0.4.1",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/lsst-sqre/vo-cutouts"
Source = "https://github.com/lsst-sqre/vo-cutouts"
[build-system]
requires = [
"setuptools>=42",
"setuptools_scm[toml]>=3.4"
]
build-backend = "setuptools.build_meta"
[tool.coverage.run]
parallel = true
branch = true
source = ["vocutouts"]
[tool.coverage.paths]
source = ["src", ".tox/*/site-packages"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:"
]
[tool.mypy]
disallow_untyped_defs = true
disallow_incomplete_defs = true
ignore_missing_imports = true
local_partial_types = true
plugins = ["pydantic.mypy"]
no_implicit_reexport = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "strict"
filterwarnings = [
# Google modules use PyType_Spec in a deprecated way.
"ignore:Type google\\..*metaclass.* custom tp_new:DeprecationWarning",
# Deprecated use of Pydantic v1 features in vo-models.
"ignore:Support for class-based `config`:DeprecationWarning",
]
# 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"]
# Use the generic Ruff configuration in ruff.toml and extend it with only
# project-specific settings.
[tool.ruff]
extend = "ruff-shared.toml"
[tool.ruff.lint.extend-per-file-ignores]
"src/vocutouts/config.py" = [
"S108", # use of /tmp is safe in this context
]
"src/vocutouts/models/request.py" = [
"TRY004", # pydantic requires ValueError, not TypeError
]
"src/vocutouts/workers/cutout.py" = [
"S108", # use of /tmp is safe in this context
]
[tool.ruff.lint.isort]
known-first-party = ["vocutouts", "tests"]
split-on-trailing-comma = false
[tool.scriv]
categories = [
"Backwards-incompatible changes",
"New features",
"Bug fixes",
"Other changes",
]
entry_title_template = "{{ version }} ({{ date.strftime('%Y-%m-%d') }})"
format = "md"
md_header_level = "2"
new_fragment_template = "file:changelog.d/_template.md.jinja"
skip_fragments = "_template.md.jinja"
[tool.setuptools_scm]