forked from microsoft/torchgeo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
292 lines (275 loc) · 12.5 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
[build-system]
requires = [
# setuptools 61+ required for pyproject.toml support
"setuptools>=61",
]
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.9"
license = {file = "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@my.utsa.edu"},
{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 :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: GIS",
]
dependencies = [
# einops 0.3+ required for einops.repeat
"einops>=0.3",
# fiona 1.8.19+ required to fix erroneous warning
# https://github.com/Toblerity/Fiona/issues/986
"fiona>=1.8.19",
# kornia 0.6.9+ required for kornia.augmentation.RandomBrightness
"kornia>=0.6.9",
# lightly 1.4.4+ required for MoCo v3 support
"lightly>=1.4.4",
# lightning 2+ required for LightningCLI args + sys.argv support
"lightning[pytorch-extra]>=2",
# matplotlib 3.3.3+ required for Python 3.9 wheels
"matplotlib>=3.3.3",
# numpy 1.19.3+ required by Python 3.9 wheels
"numpy>=1.19.3",
# pandas 1.1.3+ required for Python 3.9 wheels
"pandas>=1.1.3",
# pillow 8+ required for Python 3.9 wheels
"pillow>=8",
# pyproj 3+ required for Python 3.9 wheels
"pyproj>=3",
# rasterio 1.2+ required for Python 3.9 wheels
"rasterio>=1.2",
# rtree 1+ required for len(index), index & index, index | index
"rtree>=1",
# segmentation-models-pytorch 0.2+ required for smp.losses module
"segmentation-models-pytorch>=0.2",
# shapely 1.7.1+ required for Python 3.9 wheels
"shapely>=1.7.1",
# timm 0.4.12 required by segmentation-models-pytorch
"timm>=0.4.12",
# torch 1.12+ required by torchvision
"torch>=1.12",
# torchmetrics 0.10+ required for binary/multiclass/multilabel classification metrics
"torchmetrics>=0.10",
# torchvision 0.13+ required for torchvision.models._api.WeightsEnum
"torchvision>=0.13",
]
dynamic = ["version"]
[project.optional-dependencies]
datasets = [
# h5py 3+ required for Python 3.9 wheels
"h5py>=3",
# laspy 2+ required for laspy.read
"laspy>=2",
# opencv-python 4.4.0.46+ required for Python 3.9 wheels
"opencv-python>=4.4.0.46",
# pycocotools 2.0.5+ required for cython 3+ support
"pycocotools>=2.0.5",
# pyvista 0.34.2+ required to avoid ImportError in CI
"pyvista>=0.34.2",
# radiant-mlhub 0.3+ required for newer tqdm support required by lightning
"radiant-mlhub>=0.3",
# rarfile 4+ required for wheels
"rarfile>=4",
# scikit-image 0.18+ required for numpy 1.17+ compatibility
# https://github.com/scikit-image/scikit-image/issues/3655
"scikit-image>=0.18",
# scipy 1.6.2+ required for scikit-image 0.18+ compatibility
"scipy>=1.6.2",
# zipfile-deflate64 0.2+ required for extraction bugfix:
# https://github.com/brianhelba/zipfile-deflate64/issues/19
"zipfile-deflate64>=0.2",
]
docs = [
# ipywidgets 7+ required by nbsphinx
"ipywidgets>=7",
# nbsphinx 0.8.5 fixes bug with nbformat attributes
"nbsphinx>=0.8.5",
# release versions missing files, must install from master
"pytorch-sphinx-theme",
# sphinx 4+ required for autodoc_typehints_description_target = documented
# sphinx 6+ is incompatible with pytorch-sphinx-theme
# https://github.com/pytorch/pytorch_sphinx_theme/issues/175
"sphinx>=4,<6",
]
style = [
# black 21.8+ required for Jupyter support
"black[jupyter]>=21.8",
# flake8 3.8+ depends on pyflakes 2.2+, which fixes a bug with mypy error code ignores:
# https://github.com/PyCQA/pyflakes/pull/455
"flake8>=3.8",
# isort 5.8+ required for extend_skip option
"isort[colors]>=5.8",
# pydocstyle 6.1+ required for pyproject.toml support
"pydocstyle[toml]>=6.1",
# pyupgrade 2.8+ required for --py39-plus flag
"pyupgrade>=2.8",
]
tests = [
# mypy 0.900+ required for pyproject.toml support
"mypy>=0.900",
# nbmake 1.3.3+ required for variable mocking
"nbmake>=1.3.3",
# pytest 7.3+ required for tmp_path_retention_policy
"pytest>=7.3",
# pytest-cov 4+ required for pytest 7.2+ compatibility
"pytest-cov>=4",
]
all = [
"torchgeo[datasets,docs,style,tests]",
]
[project.scripts]
torchgeo = "torchgeo.main:main"
[project.urls]
Homepage = "https://github.com/microsoft/torchgeo"
Documentation = "https://torchgeo.readthedocs.io"
[tool.black]
target-version = ["py39", "py310"]
color = true
skip_magic_trailing_comma = true
[tool.coverage.report]
# Ignore warnings for overloads
# https://github.com/nedbat/coveragepy/issues/970#issuecomment-612602180
exclude_lines = [
"pragma: no cover",
"@overload",
]
[tool.isort]
profile = "black"
known_first_party = ["docs", "tests", "torchgeo", "train"]
skip_gitignore = true
color_output = true
[tool.mypy]
python_version = "3.9"
ignore_missing_imports = true
show_error_codes = true
exclude = "(build|data|dist|docs/src|images|logo|logs|output)/"
# Strict
warn_unused_configs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
[tool.pydocstyle]
convention = "google"
match_dir = "(datamodules|datasets|losses|models|samplers|torchgeo|trainers|transforms)"
[tool.pytest.ini_options]
# Skip slow tests by default
addopts = "-m 'not slow'"
# https://docs.pytest.org/en/latest/how-to/capture-warnings.html
filterwarnings = [
# Treat all warnings as errors
"error",
# Warnings raised by dependencies of dependencies, out of our control
# https://github.com/Cadene/pretrained-models.pytorch/issues/221
"ignore:.* is deprecated and will be removed in Pillow 10:DeprecationWarning:pretrainedmodels.datasets.utils",
# https://github.com/pytorch/vision/pull/5898
"ignore:.* is deprecated and will be removed in Pillow 10:DeprecationWarning:torchvision.transforms.functional_pil",
"ignore:.* is deprecated and will be removed in Pillow 10:DeprecationWarning:torchvision.transforms._functional_pil",
# https://github.com/rwightman/pytorch-image-models/pull/1256
"ignore:.* is deprecated and will be removed in Pillow 10:DeprecationWarning:timm.data",
# https://github.com/pytorch/pytorch/issues/72906
# https://github.com/pytorch/pytorch/pull/69823
"ignore:distutils Version classes are deprecated. Use packaging.version instead:DeprecationWarning",
"ignore:The distutils package is deprecated and slated for removal in Python 3.12:DeprecationWarning:torch.utils.tensorboard",
# https://github.com/Lightning-AI/lightning/issues/13256
# https://github.com/Lightning-AI/lightning/pull/13261
"ignore:torch.distributed._sharded_tensor will be deprecated:DeprecationWarning:torch.distributed._sharded_tensor",
# https://github.com/Lightning-AI/lightning/issues/13989
"ignore:SelectableGroups dict interface is deprecated. Use select.:DeprecationWarning:lightning.pytorch.trainer.connectors.callback_connector",
# https://github.com/Lightning-AI/lightning/issues/14594
"ignore:To copy construct from a tensor, it is recommended to use:UserWarning:lightning.pytorch.core.module",
# https://github.com/rasterio/rasterio/issues/1742
# https://github.com/rasterio/rasterio/pull/1753
"ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated:DeprecationWarning:rasterio.crs",
# https://github.com/pytorch/pytorch/issues/60053
# https://github.com/pytorch/pytorch/pull/60059
"ignore:Named tensors and all their associated APIs are an experimental feature and subject to change:UserWarning:torch.nn.functional",
# https://github.com/tensorflow/tensorboard/issues/5798
"ignore:Call to deprecated create function:DeprecationWarning:tensorboard.compat.proto",
# https://github.com/treebeardtech/nbmake/issues/68
'ignore:The \(fspath. py.path.local\) argument to NotebookFile is deprecated:pytest.PytestDeprecationWarning:nbmake.pytest_plugin',
# https://github.com/kornia/kornia/issues/777
"ignore:Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0:UserWarning:torch.nn.functional",
# 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:torch.nn.functional",
# https://github.com/scikit-image/scikit-image/issues/6663
# https://github.com/scikit-image/scikit-image/pull/6637
"ignore:`np.bool8` is a deprecated alias for `np.bool_`.:DeprecationWarning:skimage.util.dtype",
# https://github.com/lanpa/tensorboardX/pull/677
"ignore:ANTIALIAS is deprecated and will be removed in Pillow 10:DeprecationWarning:tensorboardX.summary",
# https://github.com/Lightning-AI/lightning/issues/16756
"ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning",
"ignore:pkg_resources is deprecated as an API.:DeprecationWarning:lightning_utilities.core.imports",
"ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated:DeprecationWarning:jsonargparse",
# https://github.com/pytorch/pytorch/issues/110549
"ignore:allow_ops_in_compiled_graph failed to import torch:ImportWarning:einops",
# 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",
"ignore:The .*dataloader.* does not have many workers which may be a bottleneck:lightning.fabric.utilities.warnings.PossibleUserWarning:lightning",
# Lightning warns us about using the CPU when GPU/MPS is available
"ignore:GPU available but not used.:UserWarning",
"ignore:MPS 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",
# https://github.com/kornia/kornia/pull/1611
"ignore:`ColorJitter` is now following Torchvision implementation.:DeprecationWarning:kornia.augmentation._2d.intensity.color_jitter",
# https://github.com/kornia/kornia/pull/1663
"ignore:`RandomGaussianBlur` has changed its behavior and now randomly sample sigma for both axes.:DeprecationWarning:kornia.augmentation._2d.intensity.gaussian_blur",
# Unexpected warnings, worth investigating
# Lightning is having trouble inferring the batch size for ChesapeakeCVPRDataModule and CycloneDataModule for some reason
"ignore:Trying to infer the `batch_size` from an ambiguous collection:UserWarning",
# https://github.com/pytest-dev/pytest/issues/11461
"ignore::pytest.PytestUnraisableExceptionWarning",
]
markers = [
"slow: marks tests as slow",
]
norecursedirs = [
".ipynb_checkpoints",
"data",
"__pycache__",
]
testpaths = [
"tests",
"docs/tutorials",
]
tmp_path_retention_policy = "failed"
# 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*"]