-
Notifications
You must be signed in to change notification settings - Fork 188
Expand file tree
/
Copy pathpyproject.toml
More file actions
264 lines (240 loc) · 7.58 KB
/
pyproject.toml
File metadata and controls
264 lines (240 loc) · 7.58 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
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
[project]
name = 'datacube'
dynamic = ['version']
requires-python = ">=3.10"
readme = "README.rst"
license = "Apache-2.0"
description = "An analysis environment for satellite and other earth observation data"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Information Analysis",
]
dependencies = [
'affine',
'alembic',
'antimeridian<0.4.5', # All test_index_cloning tests fail with 0.4.5.
'cachetools',
'click>=8.2', # Support for deprecated argument on options
'dask[array]',
'deprecat',
'distributed',
'GeoAlchemy2>=0.17.0',
'jsonschema[format-nongpl]>=4.18', # New reference resolution API
'lark',
'numpy>=1.26.0',
'odc-geo>=0.5.0',
'odc-loader>=0.6.4', # Consistent custom fuser support from 0.6.4
'odc-stac>=0.5.0', # First release compatible with odc-loader 0.6.x
'pandas',
'pyproj>=2.5',
'python-dateutil',
'pyyaml',
'rasterio>=1.4.4', # Handle changes in recent versions of GDAL
'shapely>=2.0',
'sqlalchemy>=2.0', # GeoAlchemy2 requires >=1.4.
'toolz',
'xarray>=0.9', # >0.9 fixes most problems with `crs` attributes being lost
]
[build-system]
requires = ["setuptools>=69", "setuptools_scm[toml]>=8,<10"]
# v69 includes py.typed files by default
build-backend = "setuptools.build_meta"
[project.urls]
Homepage = "https://opendatacube.org/"
Documentation = "https://datacube-core.readthedocs.io/"
Source = "https://github.com/opendatacube/datacube-core/"
Issues = "https://github.com/opendatacube/datacube-core/issues"
Chat = "https://discord.com/invite/4hhBQVas5U"
[project.optional-dependencies]
performance = ['ciso8601', 'bottleneck']
distributed = ['distributed', 'dask[distributed]']
s3 = ['boto3', 'botocore']
netcdf = ['netcdf4']
# Serialises +/-inf and NaN to null, so disabled until #2430 is resolved.
# orjson = ['orjson']
postgres = ['psycopg2']
psycopg3 = ['psycopg']
# tifffile 2026 (a scikit-image dependency) tells pip/uv it is Python 3.10 compatible, but isn't.
# Remove pins after we move minimum to Python 3.12
scikit-image = ['scikit-image<0.26','tifffile<2026']
[dependency-groups]
dev = [
'datacube[netcdf,postgres,psycopg3,s3,scikit-image]',
# Test requirements
'hypothesis',
'moto>=5.0',
'pytest',
'pytest-cov',
'pytest-httpserver',
# Linting tools
'pylint',
'ruff',
# Types and type checking
"boto3-stubs",
"botocore-stubs",
"mypy",
"pandas-stubs",
"ty",
"types-affine",
"types-cachetools",
"types-jsonschema",
"types-psutil",
"types-python-dateutil",
"types-PyYAML",
"types-setuptools",
{include-group = "doc"},
]
doc = [
'autodocsumm',
'beautifulsoup4',
'ipython',
'nbsphinx',
'pydata-sphinx-theme',
'recommonmark',
"Sphinx>=8.1.3,<9; python_version<'3.11'",
"Sphinx>=8.2.3,<9; python_version>='3.11'",
'sphinx_autodoc_typehints', # Propagate mypy info into docs
'sphinx-click',
'sphinx-design',
'sphinx-toolbox', # Sphinx 9 compatibility issues
]
[project.scripts]
datacube = 'datacube.scripts.cli_app:cli'
datacube-search = 'datacube.scripts.search_tool:cli'
datacube-worker = 'datacube.execution.worker:main'
[project.entry-points."datacube.plugins.io.read"]
netcdf = 'datacube.drivers.netcdf.driver:reader_driver_init'
[project.entry-points.'datacube.plugins.io.write']
netcdf = 'datacube.drivers.netcdf.driver:writer_driver_init'
[project.entry-points."datacube.plugins.index"]
postgres = 'datacube.index.postgres.index:index_driver_init'
null = 'datacube.index.null.index:index_driver_init'
memory = 'datacube.index.memory.index:index_driver_init'
postgis = 'datacube.index.postgis.index:index_driver_init'
[tool.codespell]
ignore-words-list = 'Nd,nD,UE'
skip = "uv.lock,./build,./docs/build,__pycache__"
# Ignore base64 encoded strings
ignore-regex = '[A-Za-z0-9+/]{100,}'
[tool.coverage.run]
branch = false
omit = [
"datacube/_version.py",
"datacube/drivers/postgis/alembic/versions/*",
]
[tool.coverage.report]
exclude_also = [
# From coverage manual (https://coverage.readthedocs.io/en/latest/excluding.html).
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
# OUR EXCEPTIONS:
"except ImportError:",
"pytest.fail\\(", # Parameter checks in pytest.
"raise TypeError\\(", # "Impossible" errors.
]
[tool.pytest.ini_options]
addopts = "--doctest-modules"
console_output_style = "times"
testpaths = ["datacube", "tests", "integration_tests"]
norecursedirs = [".*", "build", "dist", ".git", "tmp*", "docs", ".jj"]
filterwarnings = [
"ignore::FutureWarning",
"ignore:datetime.datetime.utcnow*:DeprecationWarning:botocore.*",
"ignore:.*numpy.ndarray size changed.*:"
]
[tool.ruff]
extend-exclude = [
"datacube/_version.py",
"datacube/drivers/postgis/alembic/versions",
"docs/source/conf.py",
]
[tool.ruff.format]
docstring-code-format = true # Reformat code in doc strings.
[tool.ruff.lint]
future-annotations = true
select = [
"A", # Don't shadow built-ins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D419", # No empty doc strings
"E", # pycodestyle errors
"EXE", # flake8-executable
"FLY", # flynt
"FURB", # refurb
"I", # isort
"N", # pep8-naming
"RET", # flake8-ret
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # pycodestyle warnings
"F", # pyflakes
"T10", # flake8-debugger
"TC", # Import types in TYPE_CHECKING block
"TID253", # Banned imports
]
ignore = [
# FIXME: re-enable these rules.
"B008",
"B022",
"B023",
"B905",
"RUF012",
"SIM115",
]
[tool.ruff.lint.flake8-tidy-imports]
banned-module-level-imports = [
"json", # Import datacube.utils.json instead.
]
[tool.ruff.lint.pep8-naming]
extend-ignore-names = [
"A", "B", "H", "L", "M", "N", "NX", "NY", "R", "S",
"T", "W", "WS", "X", "XX", "XY", "YY", "Y", "Z",
]
[tool.ruff.lint.per-file-ignores]
# SQLAlchemy has overloaded ==, so use that (or is_) to compare with None.
"datacube/drivers/postgis/_api.py" = ["E711"]
"datacube/drivers/postgres/_api.py" = ["E711"]
"datacube/drivers/postgres/_schema.py" = ["E711"]
# SQLAlchemy uses the types for the schema so runtime types are required.
"datacube/drivers/postgis/_schema.py" = ["E711", "TC002", "TC003"]
[tool.ruff.lint.pycodestyle]
max-line-length = 120
[tool.setuptools.packages.find]
exclude = ['integration_tests', 'tests', 'examples', 'docs']
include = ['datacube*']
[tool.setuptools_scm]
write_to = 'datacube/_version.py'
fallback_version = "1.9.18"
[tool.ty.src]
include = ["datacube", "examples", "integration_tests", "tests"]
[tool.mypy]
python_version = '3.10'
allow_redefinition = true
enable_error_code = ['explicit-override']
ignore_missing_imports = true
warn_redundant_casts = true
warn_unused_ignores = true