-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathpyproject.toml
More file actions
181 lines (163 loc) · 4.78 KB
/
pyproject.toml
File metadata and controls
181 lines (163 loc) · 4.78 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
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm[git]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "eodatasets3"
description = "Packaging, metadata and provenance for OpenDataCube EO3 datasets"
readme = "README.md"
requires-python = ">=3.10"
license = "Apache-2.0"
authors = [{name = "Open Data Cube"}]
dynamic = ["version"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
]
dependencies = [
"affine",
"attrs>=18.1", # 18.1 adds 'factory' syntactic sugar
"boltons",
"botocore", # missing from datacube
"boto3",
"cattrs>=1.0",
"ciso8601",
"click",
"defusedxml",
"fiona",
"h5py",
"jsonschema>=4.18", # We want a Draft6Validator
"numpy>=1.15.4",
"pyproj",
"rasterio",
"ruamel.yaml",
"scipy",
"shapely",
"structlog",
"xarray",
"datacube>=1.9.13,<1.10.0",
"pystac>=1.8.4",
]
[project.urls]
"Bug Reports" = "https://github.com/opendatacube/eo-datasets/issues"
"Source" = "https://github.com/opendatacube/eo-datasets"
[project.scripts]
eo3-validate = "eodatasets3.validate:run"
eo3-prepare = "eodatasets3.scripts.prepare:run"
eo3-recompress-tar = "eodatasets3.scripts.recompress:main"
eo3-package-wagl = "eodatasets3.scripts.packagewagl:run"
eo3-to-stac = "eodatasets3.scripts.tostac:run"
[project.optional-dependencies]
# Optional valid-data poly handling methods
algorithms = ["scikit-image"]
# The (legacy) prepare scripts
ancillary = ["checksumdir", "netCDF4"]
# If packaging ard/wagl.
wagl = ["h5py"] # h5py is already in core, but list it here for clarity if needed.
all = [
"checksumdir", "netCDF4", # From ancillary
"deepdiff>=8.0",
"h5py", # From wagl (and core)
"mock",
"pystac>=1.12",
"pytest-cov",
"pytest-xdist",
"pytest",
"rio_cogeo",
"ruff",
"scikit-image", # From algorithms
"sphinx_rtd_theme",
"sphinx-autodoc-typehints",
]
test = [
"checksumdir", "netCDF4", # From ancillary
"deepdiff>=8.0",
"h5py", # From wagl (and core)
"mock",
"pystac>=1.12",
"pytest-cov",
"pytest-xdist",
"pytest",
"rio_cogeo",
"ruff",
"scikit-image", # From algorithms
"sphinx_rtd_theme",
"sphinx-autodoc-typehints",
]
deployment = ["h5py"] # h5py is already in core, but list it here for clarity if needed.
[dependency-groups]
dev = [
"checksumdir>=1.2.0",
"deepdiff>=8.4.2",
"h5py>=3.13.0",
"mock>=5.2.0",
"netcdf4>=1.7.2",
"pytest>=8.3.5",
"pytest-cov>=6.1.1",
"python-rapidjson",
"pytest-xdist>=3.6.1",
"rio-cogeo>=5.4.1",
"ruff>=0.11.8",
"scikit-image>=0.25.2",
]
# IMPORTANT
#
# Leave Setuptools Defaults Alone to enable Automatic Discovery
# https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#automatic-discovery
#
# Otherwise we end up with extra unwanted files in the distribution packages.
[tool.setuptools_scm]
write_to = "eodatasets3/_version.py"
tag_regex = "^eodatasets3-(.*)"
[tool.coverage.run]
source = ["eodatasets3"]
branch = true
[tool.coverage.report]
precision = 2
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"raise NotImplemented",
"if __name__ == .__main__.:",
]
[tool.pytest.ini_options]
testpaths = ["eodatasets3", "tests"]
addopts = "--doctest-modules"
filterwarnings = ["ignore::FutureWarning"]
norecursedirs = [".*", "build", "dist", ".git", "tmp*"]
[tool.ruff]
extend-exclude = [
"eodatasets3/_version.py",
]
[tool.ruff.lint]
select = [
"A", # Don't shadow built-ins
"C4", # Use list comprehensions etc
"E", # pycodestyle
"EXE", # Shebangs+Executable permisssions should match
"F", # pyflakes
"G", # Use logging formatter, not manual string concat
"I", # Auto-sort imports
"ICN", # Use standard import names, like np for numpy
"N", # pep8-naming
"NPY", # Numpy
"RUF", # Ruff-specific python rules
"S", # Bandit (security)
"UP" # pyupgrade
]
ignore = [
# Disable these as we don't want to change old code unnecessarily.
"RUF013", # PEP 484 prohibits implicit `Optional`
"C408", # Unnecessary `dict` call (rewrite as a literal)
"ICN001", # `numpy` should be imported as `np`
"N818", # Exception name should be named with an Error suffix
"S324", # SHA1 is required for compatibility.
]
# Matching old behaviour: We auto-format with the smaller line default
# ... but only enforce line length to be under this larger 120 limit.
pycodestyle.max-line-length = 120
[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = ["A001"] # Variable `copyright` shadowing a Python builtin (needed for api)
"tests/*.py" = ["S101"] # Tests are supposed to assert.