-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
197 lines (177 loc) · 5.25 KB
/
Copy pathpyproject.toml
File metadata and controls
197 lines (177 loc) · 5.25 KB
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
[build-system]
requires = ["uv_build>=0.12.1,<0.13"]
build-backend = "uv_build"
[project]
name = "odp-releaser"
version = "0.1.0"
authors = [
{ name = "Alex Kerney", email = "akerney@gmri.org" },
]
description = "Tooling to help manage releasing Docker images across repos"
readme = "README.md"
license = "Apache-2.0"
license-files = ["LICENSE"]
requires-python = ">=3.12"
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
dependencies = [
"githubkit[auth-app]>=0.16.0",
"typer>=0.27.0",
"yamlpath>=3.9.1",
]
[project.scripts]
odp-releaser = "odp_releaser.main:app"
[project.urls]
Homepage = "https://github.com/gulfofmaine/odp-releaser"
"Bug Tracker" = "https://github.com/gulfofmaine/odp-releaser/issues"
Discussions = "https://github.com/gulfofmaine/odp-releaser/discussions"
Changelog = "https://github.com/gulfofmaine/odp-releaser/releases"
[dependency-groups]
test = [
"inline-snapshot>=0.35.3",
"jsonschema>=4.26.0",
"pytest >=9",
"pytest-cov >=7",
"respx>=0.23.1",
"types-jsonschema>=4.26.0.20260518",
]
dev = [
{ include-group = "test" },
{ include-group = "docs" }
]
docs = [
"griffe-pydantic>=1.3.1",
"markdown-exec[ansi]>=1.12.3",
"mkdocs-typer2[zensical]>=0.4.1",
"mkdocstrings[python]>=1.0.6",
"mkdocstrings-github>=0.8.0",
"zensical>=0.0.52",
]
[tool.pytest]
minversion = "9.0"
addopts = ["-ra", "--showlocals", "-v"]
strict = true
filterwarnings = [
"error",
]
log_level = "INFO"
testpaths = [
"tests",
]
[tool.coverage]
run.source = ["odp_releaser"]
report.exclude_also = [
'\.\.\.',
'if typing.TYPE_CHECKING:',
]
[tool.mypy]
files = ["src", "tests"]
# The pre-commit mypy hook runs in its own environment without the project
# installed, and only on the files being committed -- so a commit touching
# just tests/ leaves it unable to resolve `odp_releaser.*` at all. Pointing
# mypy at the src layout fixes that without affecting a full run.
mypy_path = ["src"]
warn_unused_configs = true
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
[[tool.mypy.overrides]]
module = "odp_releaser.*"
disallow_untyped_defs = true
disallow_incomplete_defs = true
[[tool.mypy.overrides]]
module = ["yamlpath.*"]
ignore_missing_imports = true
[tool.ruff]
show-fixes = true
[tool.ruff.lint]
extend-select = [
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"FLY", # flynt
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"NPY", # NumPy specific rules
"PD", # pandas-vet
"PERF", # perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T20", # flake8-print
"TC", # flake8-type-checking
"TRY", # tryceratops
"UP", # pyupgrade
"YTT", # flake8-2020
]
ignore = [
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
]
# Uncomment if using a _compat.typing backport
# typing-modules = ["odp_releaser._compat.typing"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["T20"]
"noxfile.py" = ["T20"]
# Typer resolves these Annotated option aliases at runtime (via
# inspect.signature(eval_str=True)), so they must stay imported at module
# scope and cannot move into a type-checking block. Same for pydantic
# models resolving their field annotations at class-build time.
"src/odp_releaser/make_payload.py" = ["TC001"]
"src/odp_releaser/report_deployment.py" = ["TC001"]
"src/odp_releaser/comment_on_pr.py" = ["TC001"]
"src/odp_releaser/report_metadata.py" = ["TC001"]
# PT028 assumes any ``test_*`` function is a pytest test; these CLI commands
# are named ``test_notify``/``test_bump_images`` for the ``test notify``/
# ``test bump-images`` subcommands, not pytest tests, so their Typer options
# legitimately have defaults.
"src/odp_releaser/notify.py" = ["TC001", "PT028"]
"src/odp_releaser/bump_image_tester.py" = ["PT028"]
[tool.pylint]
ignore-paths = [".*/_version.py"]
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
messages_control.disable = [
"design",
"fixme",
"line-too-long",
"missing-module-docstring",
"missing-function-docstring",
"wrong-import-position",
"logging-fstring-interpolation",
]
[tool.uv]
exclude-newer = "1 week"