-
Notifications
You must be signed in to change notification settings - Fork 546
Expand file tree
/
Copy pathpyproject.toml
More file actions
273 lines (254 loc) · 10.2 KB
/
pyproject.toml
File metadata and controls
273 lines (254 loc) · 10.2 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
265
266
267
268
269
270
271
272
273
[build-system]
requires = [
# setuptools 77.0.1+ required for PEP 639 support
"setuptools>=77.0.1",
]
build-backend = "setuptools.build_meta"
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
[project]
name = "torchgeo"
description = "TorchGeo: datasets, samplers, transforms, and pre-trained models for geospatial data"
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{name = "Adam J. Stewart", email = "ajstewart426@gmail.com"},
]
maintainers = [
{name = "Adam J. Stewart", email = "ajstewart426@gmail.com"},
{name = "Caleb Robinson", email = "Caleb.Robinson@microsoft.com"},
{name = "Isaac Corley", email = "isaac.corley@proton.me"},
{name = "Nils Lehmann", email = "n.lehmann@tum.de"},
{name = "Ashwin Nair", email = "ashnair0007@gmail.com"},
]
keywords = ["pytorch", "deep learning", "machine learning", "remote sensing", "satellite imagery", "earth observation", "geospatial"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: GIS",
]
dependencies = [
# einops 0.3+ required for einops.repeat
"einops>=0.3",
# geopandas 1.0+ required to use pyogrio backend instead of Fiona (unmaintained)
"geopandas>=1.0",
# jsonargparse 4.35+ required for Python 3.12.8+ support
"jsonargparse[signatures]>=4.35",
# kornia 0.8.2+ required for fix to VideoSequential
# https://github.com/kornia/kornia/pull/3330
"kornia>=0.8.2",
# lightly 1.4.5+ required for LARS optimizer
# lightly 1.4.26 is incompatible with the version of timm required by smp
# https://github.com/torchgeo/torchgeo/issues/1824
"lightly>=1.4.5,!=1.4.26",
# lightning 2.4+ required for fastapi and pydantic v2 support in lightning
# lightning 2.5.0 contains backwards-incompatible import changes
# https://github.com/Lightning-AI/pytorch-lightning/issues/20511
# lightning 2.5.5-2.5.6 contain known bugs related to checkpoint loading
# https://github.com/torchgeo/torchgeo/issues/2995
"lightning>=2.4,!=2.5.0,!=2.5.5,!=2.5.6",
# matplotlib 3.7.3+ required for Python 3.12 wheels
"matplotlib>=3.7.3",
# numpy 1.26+ required for Python 3.12 wheels
"numpy>=1.26",
# pandas 2.1.1+ required for Python 3.12 wheels
"pandas>=2.1.1",
# pillow 10+ required for Python 3.12 wheels
"pillow>=10",
# pyproj 3.6.1+ required for Python 3.12 wheels
"pyproj>=3.6.1",
# rasterio 1.4+ required for rasterio.merge.merge support for positive y-resolution
# https://github.com/rasterio/rasterio/issues/3094
# rasterio 1.4.0-1.4.2 lack support for merging WarpedVRT objects
# https://github.com/rasterio/rasterio/issues/3196
"rasterio>=1.4.3",
# requests 2.25+ required for urllib3 with Python 3.12 support
"requests>=2.25",
# segmentation-models-pytorch 0.5+ required for new UnetDecoder API
"segmentation-models-pytorch>=0.5",
# shapely 2.0.2+ required for Python 3.12 wheels
"shapely>=2.0.2",
# timm 1.0.3+ required for forward_intermediates support for ViT
"timm>=1.0.3",
# torch 2.2+ required for Python 3.12 wheels
"torch>=2.2",
# torchmetrics 1.2+ required for average argument in mAP metric
"torchmetrics[detection]>=1.2",
# torchvision 0.17+ required for Python 3.12 wheels
"torchvision>=0.17",
# typing-extensions 4.8+ required by torch 2.2
# can be removed once Python 3.13 is minimum supported version
"typing-extensions>=4.8",
]
dynamic = ["version"]
[project.optional-dependencies]
datasets = [
# h5py 3.10+ required for Python 3.12 wheels
# h5py 3.15+ is incompatible with netcdf4 wheels; no h5py on Python 3.14+
"h5py>=3.10,<3.15; python_version<'3.14'",
# laspy 2.5.3+ required for wheels
"laspy>=2.5.3",
# netcdf4 1.6.5+ required for Python 3.12 wheels
"netcdf4>=1.6.5",
# pandas 2.1.1+ required for Python 3.12 wheels
"pandas[parquet]>=2.1.1",
# rioxarray 0.14.1+ required for rasterio 1.4+ compatibility
"rioxarray>=0.14.1",
# scipy 1.11.2+ required for Python 3.12 wheels
"scipy>=1.11.2",
# webdataset 0.2.4+ required for PyTorch tuple seed support
"webdataset>=0.2.4",
# xarray 0.17+ required by rioxarray
"xarray>=0.17",
]
docs = [
# ipywidgets 7+ required by nbsphinx
"ipywidgets>=7",
# myst-parser 0.18.0+ required for sphinx 5.0+ compatibility
"myst-parser>=0.18.0",
# nbsphinx 0.8.5 fixes bug with nbformat attributes
"nbsphinx>=0.8.5",
# pydata-sphinx-theme 0.14.0+ required for sphinx 5.0+ compatibility
"pydata-sphinx-theme>=0.14.0",
# sphinx 5.3+ required to allow section titles inside autodoc class docstrings
# https://github.com/sphinx-doc/sphinx/pull/10887
"sphinx>=5.3",
# sphinx-github-changelog 1.7.2+ required for image URL fix
"sphinx-github-changelog>=1.7.2",
]
models = [
# microsoft-aurora 1.6+ required for timm 1.0+ support
"microsoft-aurora>=1.6",
# olmoearth-pretrain-minimal 0.0.2+ required for normalization support
"olmoearth-pretrain-minimal>=0.0.2",
]
style = [
# pandas 2.1.1+ required for Python 3.12 wheels
"pandas-stubs>=2.1.1",
# ruff 0.9+ required for 2025 style guide
"ruff>=0.9",
# ty 0.0.25+ required for the following bug fix: https://github.com/astral-sh/ty/issues/2985
"ty>=0.0.25",
# geopandas 1.0+ required to use pyogrio backend instead of Fiona (unmaintained)
"types-geopandas>=1.0",
# requests 2.25+ required for urllib3 with Python 3.12 support
"types-requests>=2.25",
# shapely 2.0.2+ required for Python 3.12 wheels
"types-shapely>=2.0.2",
]
tests = [
# nbmake 1.4.5+ removes pkg_resources dependency
"nbmake>=1.4.5",
# packaging 21+ required by sphinx
"packaging>=21",
# pytest 7.3.2+ required for Python 3.12 support
"pytest>=7.3.2",
# pytest-cov 4+ required for pytest 7.2+ compatibility
"pytest-cov>=4",
# pytest-socket 0.3.4+ required for wheels
"pytest-socket>=0.3.4",
]
all = [
"torchgeo[datasets,docs,models,style,tests]",
]
[project.scripts]
torchgeo = "torchgeo.main:main"
[project.urls]
Codecov = "https://app.codecov.io/gh/torchgeo/torchgeo"
Documentation = "https://torchgeo.readthedocs.io"
Homepage = "https://github.com/torchgeo/torchgeo"
Slack = "https://torchgeo.slack.com"
# https://coverage.readthedocs.io/en/latest/config.html
[tool.coverage.report]
# Ignore warnings for overloads
# https://github.com/nedbat/coveragepy/issues/970#issuecomment-612602180
exclude_also = [
"@overload",
]
show_missing = true
[tool.pytest.ini_options]
# Skip slow tests by default
addopts = "-m 'not slow' --disable-socket"
# https://docs.pytest.org/en/latest/how-to/capture-warnings.html
filterwarnings = [
# Warnings raised by dependencies of dependencies, out of our control
# https://github.com/pytorch/pytorch/issues/153607
'ignore:The global interpreter lock \(GIL\) has been enabled to load module:RuntimeWarning',
# https://github.com/Lightning-AI/pytorch-lightning/issues/21326
'ignore:`isinstance\(treespec, LeafSpec\)` is deprecated, use `isinstance\(treespec, TreeSpec\) and treespec.is_leaf\(\)` instead.:FutureWarning',
# https://github.com/pytorch/pytorch/pull/24929
"ignore:Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0:UserWarning",
# https://github.com/pytorch/pytorch/issues/136264
"ignore:__array__ implementation doesn't accept a copy keyword:DeprecationWarning",
"ignore:__array_wrap__ must accept context and return_scalar arguments:DeprecationWarning",
# https://github.com/lightly-ai/lightly/issues/1791
# https://github.com/pydantic/pydantic/issues/12618
"ignore:Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.:UserWarning",
"ignore:ForwardRef._evaluate is a private API and is retained for compatibility:DeprecationWarning",
# Expected warnings
# Lightning warns us about using num_workers=0, but it's faster on macOS
"ignore:The .*dataloader.* does not have many workers which may be a bottleneck:UserWarning:lightning",
# Lightning warns us about using the CPU when GPU/MPS is available
"ignore:GPU available but not used.:UserWarning",
# Lightning warns us if TensorBoard is not installed
"ignore:Starting from v1.9.0, `tensorboardX` has been removed as a dependency of the `lightning.pytorch` package:UserWarning",
# https://github.com/Lightning-AI/lightning/issues/18545
"ignore:LightningCLI's args parameter is intended to run from within Python like if it were from the command line.:UserWarning",
# Unexpected warnings, worth investigating
# https://github.com/shapely/shapely/issues/2215
"ignore:divide by zero encountered in oriented_envelope:RuntimeWarning",
"ignore:invalid value encountered in oriented_envelope:RuntimeWarning",
]
markers = [
"slow: marks tests as slow",
]
norecursedirs = [
".ipynb_checkpoints",
"data",
"__pycache__",
]
testpaths = [
"tests",
"docs/tutorials",
]
tmp_path_retention_count = 1
tmp_path_retention_policy = "failed"
# https://docs.astral.sh/ruff/settings/
[tool.ruff]
extend-include = ["*.ipynb"]
fix = true
[tool.ruff.format]
docstring-code-format = true
quote-style = "single"
skip-magic-trailing-comma = true
[tool.ruff.lint]
extend-select = ["ANN", "D", "I", "RUF", "UP"]
ignore = ["ANN401"]
[tool.ruff.lint.per-file-ignores]
"docs/**" = ["ANN", "D"]
"tests/**" = ["D"]
[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.ruff.lint.pydocstyle]
convention = "google"
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[tool.setuptools.dynamic]
version = {attr = "torchgeo.__version__"}
[tool.setuptools.package-data]
torchgeo = ["py.typed"]
[tool.setuptools.packages.find]
include = ["torchgeo*"]
[tool.ty.rules]
deprecated = "ignore"
unresolved-attribute = "ignore"
unresolved-import = "ignore"
[tool.ty.src]
include = ["torchgeo", "tests"]
exclude = ["tests/data"]