-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
328 lines (296 loc) · 8.11 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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.build]
includes = [
"stac_model",
]
[project]
authors = [
{name = "Ryan Avery", email = "ryan@wherobots.com"},
{name = "Francis Charette-Migneault", email = "francis.charette-migneault@crim.ca"},
]
license = {text = "Apache Software License 2.0"}
requires-python = "<4.0,>=3.10"
dependencies = [
"typer<1.0.0,>=0.9.0",
"rich<14.0.0,>=13.7.0",
"pydantic<3.0.0,>=2.6.3",
"pydantic-core<3,>=2",
"pystac<2.0.0,>=1.9.0",
"shapely<3,>=2",
"jsonschema<5.0.0,>=4.21.1",
"pip>=24.3.1",
]
name = "stac-model"
version = "0.2.0"
description = "A PydanticV2 validation and serialization libary for the STAC ML Model Extension"
readme = "README_STAC_MODEL.md"
keywords = []
classifiers = [
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Topic :: File Formats :: JSON :: JSON Schema",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Image Processing",
"Topic :: Scientific/Engineering :: Image Recognition",
]
[tool.uv]
dev-dependencies = [
"mypy<2.0.0,>=1.0.0",
"mypy-extensions<1.0.0,>=0.4.3",
"pre-commit<3.0.0,>=2.21.0",
"bandit<2.0.0,>=1.7.5",
"safety<3.0.0,>=2.3.4",
"pystac<2.0.0,>=1.10.0",
"pydocstyle[toml]<7.0.0,>=6.2.0",
"pydoclint<0.6,>=0.3",
"pytest<8.0.0,>=7.2.1",
"pytest-cov<5.0.0,>=4.1.0",
"pytest-mock<4.0.0,>=3.10.0",
"pytest-timeout<3.0.0,>=2.2.0",
"pytest-benchmark<5.0.0,>=4.0.0",
"pytest-sugar<1.0.0,>=0.9.7",
"pytest-click<2.0.0,>=1.1.0",
"pytest-pikachu<2.0.0,>=1.0.0",
"coverage<8.0.0,>=7.3.0",
"ruff<1.0.0,>=0.2.2",
"bump-my-version<0.27,>=0.21",
"types-python-dateutil>=2.9.0.20241003",
]
[project.urls]
homepage = "https://github.com/stac-extensions/mlm/blob/main/README_STAC_MODEL.md"
repository = "https://github.com/crim-ca/mlm-extension"
[project.scripts]
stac-model = "stac_model.__main__:app"
[tool.bumpversion]
# NOTE:
# Although these definitions are provided in this 'stac-model' project file,
# they are actually intented for versioning the MLM specification itself.
# To version 'stac-model', use the 'bump-my-version bump' operation.
# See also https://github.com/stac-extensions/mlm/blob/main/CONTRIBUTING.md#building-and-releasing
current_version = "1.3.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = true
ignore_missing_files = false
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
commit_args = "--no-verify"
message = "Bump version: {current_version} → {new_version}"
[[tool.bumpversion.files]]
glob = "**/*.json"
glob_exclude = [
".git/**",
"**/__pycache__/**",
".mypy_cache/**",
".tox/**",
".venv/**",
"_build/**",
"build/**",
"dist/**",
"node_modules/**",
]
search = "https://stac-extensions.github.io/mlm/v{current_version}/schema.json"
replace = "https://stac-extensions.github.io/mlm/v{new_version}/schema.json"
[[tool.bumpversion.files]]
glob = "**/*.md"
glob_exclude = [
".git/**",
"**/__pycache__/**",
".mypy_cache/**",
".tox/**",
".venv/**",
"_build/**",
"build/**",
"dist/**",
"node_modules/**",
]
search = "https://stac-extensions.github.io/mlm/v{current_version}/schema.json"
replace = "https://stac-extensions.github.io/mlm/v{new_version}/schema.json"
[[tool.bumpversion.files]]
glob = "**/*.py"
glob_exclude = [
".git/**",
"**/__pycache__/**",
".mypy_cache/**",
".tox/**",
".venv/**",
"_build/**",
"build/**",
"dist/**",
"node_modules/**",
]
search = "https://stac-extensions.github.io/mlm/v{current_version}/schema.json"
replace = "https://stac-extensions.github.io/mlm/v{new_version}/schema.json"
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = """
## [Unreleased](https://github.com/stac-extensions/mlm/tree/main)
"""
replace = """
## [Unreleased](https://github.com/stac-extensions/mlm/tree/main)
### Added
- n/a
### Changed
- n/a
### Deprecated
- n/a
### Removed
- n/a
### Fixed
- n/a
## [v{new_version}](https://github.com/stac-extensions/mlm/tree/v{new_version})
"""
[[tool.bumpversion.files]]
filename = "CITATION.cff"
search = "https://stac-extensions.github.io/mlm/v{current_version}/schema.json"
replace = "https://stac-extensions.github.io/mlm/v{new_version}/schema.json"
[[tool.bumpversion.files]]
filename = "package.json"
search = "\"version\": \"{current_version}\""
replace = "\"version\": \"{new_version}\""
[tool.ruff]
ignore = ["UP007", "E501"]
exclude = [
".git",
"__pycache__",
".mypy_cache",
".tox",
".venv",
"_build",
"buck-out",
"build",
"dist",
"env",
"venv",
"node_modules",
]
respect-gitignore = true
line-length = 120
show-fixes = true
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
]
[tool.ruff.lint.isort]
known-local-folder = ["tests", "conftest"]
known-first-party = ["stac_model"]
extra-standard-library = ["typing_extensions"]
[tool.mypy]
# https://github.com/python/mypy
# https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file
python_version = "3.10"
pretty = true
show_traceback = true
color_output = true
allow_redefinition = false
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
ignore_missing_imports = true
implicit_reexport = false
no_implicit_optional = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
plugins = [
"pydantic.mypy"
]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.pydocstyle]
# https://github.com/PyCQA/pydocstyle
# http://www.pydocstyle.org/en/stable/usage.html#available-options
convention = "google"
match_dir = "^(stac_model|tests)"
# ignore missing documentation, just validate provided ones
add_ignore = "D100,D101,D102,D103,D104,D105,D107,D200,D202,D204,D212,D401"
[tool.pydoclint]
# https://github.com/jsh9/pydoclint
# https://jsh9.github.io/pydoclint/how_to_config.html
style = "google"
exclude = '\.git|\.hg|\.mypy_cache|\.tox|.?v?env|__pycache__|_build|buck-out|dist|node_modules'
# don't require type hints, since we have them in the signature instead (don't duplicate)
arg-type-hints-in-docstring = false
arg-type-hints-in-signature = true
check-return-types = false
[tool.pytest.ini_options]
# https://github.com/pytest-dev/pytest
# https://docs.pytest.org/en/6.2.x/customize.html#pyproject-toml
# Directories that are not visited by pytest collector:
norecursedirs =[
"hooks",
"*.egg",
".eggs",
"dist",
"build",
"docs",
".tox",
".git",
"__pycache__",
"node_modules",
]
doctest_optionflags = ["NUMBER", "NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL"]
timeout = 1000
# Extra options:
addopts = [
"--strict-markers",
"--tb=short",
"--doctest-modules",
"--doctest-continue-on-failure",
"--pikachu"
]
[tool.coverage.run]
source = ["tests"]
branch = true
[tool.coverage.report]
exclude_also = [
"def main",
"if __name__ == .__main__.:"
]
fail_under = 50
show_missing = true
[tool.coverage.paths]
source = ["stac_model"]