2021-05-21 06:22:30 +03:00
[ build-system ]
requires = [
2023-07-01 00:37:33 +03:00
# setuptools 61+ required for pyproject.toml support
"setuptools>=61,<69" ,
2021-05-21 06:22:30 +03:00
]
build-backend = "setuptools.build_meta"
2021-07-04 23:52:12 +03:00
2023-07-01 00:37:33 +03:00
# 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,<4"
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,<0.7" ,
# fiona 1.8.19+ required to fix erroneous warning
# https://github.com/Toblerity/Fiona/issues/986
"fiona>=1.8.19,<2" ,
# kornia 0.6.9+ required for kornia.augmentation.RandomBrightness
"kornia>=0.6.9,<0.7" ,
# lightly 1.4.4+ required for MoCo v3 support
"lightly>=1.4.4" ,
# lightning 1.8+ is first release
"lightning>=1.8,<3" ,
# matplotlib 3.3.3+ required for Python 3.9 wheels
"matplotlib>=3.3.3,<4" ,
# numpy 1.19.3+ required by Python 3.9 wheels
"numpy>=1.19.3,<2" ,
# pillow 8+ required for Python 3.9 wheels
2023-07-04 00:37:20 +03:00
"pillow>=8,<11" ,
2023-07-01 00:37:33 +03:00
# pyproj 3+ required for Python 3.9 wheels
"pyproj>=3,<4" ,
# rasterio 1.2+ required for Python 3.9 wheels
"rasterio>=1.2,<2" ,
# rtree 1+ required for len(index), index & index, index | index
"rtree>=1,<2" ,
# segmentation-models-pytorch 0.2+ required for smp.losses module
"segmentation-models-pytorch>=0.2,<0.4" ,
# shapely 1.7.1+ required for Python 3.9 wheels
"shapely>=1.7.1,<3" ,
# timm 0.4.12 required by segmentation-models-pytorch
"timm>=0.4.12,<0.10" ,
# torch 1.12+ required by torchvision
"torch>=1.12,<3" ,
# torchmetrics 0.10+ required for binary/multiclass/multilabel classification metrics
2023-07-06 19:54:34 +03:00
"torchmetrics>=0.10,<2" ,
2023-07-01 00:37:33 +03:00
# torchvision 0.13+ required for torchvision.models._api.WeightsEnum
"torchvision>=0.13,<0.16" ,
]
dynamic = [ "version" ]
[ project . optional-dependencies ]
datasets = [
# h5py 3+ required for Python 3.9 wheels
"h5py>=3,<4" ,
# laspy 2+ required for laspy.read
"laspy>=2,<3" ,
# opencv-python 4.4.0.46+ required for Python 3.9 wheels
"opencv-python>=4.4.0.46,<5" ,
# pandas 1.1.3+ required for Python 3.9 wheels
"pandas>=1.1.3,<3" ,
# pycocotools 2.0.4+ required to avoid use of deprecated setuptools fetch_build_eggs
"pycocotools>=2.0.4,<3" ,
# pyvista 0.29+ required for to avoid segfault during testing
2023-07-01 01:00:19 +03:00
"pyvista>=0.29,<0.41" ,
2023-07-01 00:37:33 +03:00
# radiant-mlhub 0.3+ required for newer tqdm support required by lightning
"radiant-mlhub>=0.3,<0.6" ,
# rarfile 4+ required for wheels
"rarfile>=4,<5" ,
# scikit-image 0.18+ required for numpy 1.17+ compatibility
# https://github.com/scikit-image/scikit-image/issues/3655
"scikit-image>=0.18,<0.22" ,
# scipy 1.6.2+ required for scikit-image 0.18+ compatibility
"scipy>=1.6.2,<2" ,
# zipfile-deflate64 0.2+ required for extraction bugfix:
# https://github.com/brianhelba/zipfile-deflate64/issues/19
"zipfile-deflate64>=0.2,<0.3" ,
]
docs = [
# ipywidgets 7+ required by nbsphinx
"ipywidgets>=7,<9" ,
# nbsphinx 0.8.5 fixes bug with nbformat attributes
"nbsphinx>=0.8.5,<0.10" ,
# 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,<24" ,
# 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,<7" ,
# isort 5.8+ required for extend_skip option
"isort[colors]>=5.8,<6" ,
# pydocstyle 6.1+ required for pyproject.toml support
"pydocstyle[toml]>=6.1,<7" ,
# pyupgrade 2.8+ required for --py39-plus flag
"pyupgrade>=2.8,<4" ,
]
tests = [
# hydra-core 1+ required for omegaconf 2 support
"hydra-core>=1,<2" ,
# mypy 0.900+ required for pyproject.toml support
"mypy>=0.900,<2" ,
# nbmake 1.3.3+ required for variable mocking
"nbmake>=1.3.3,<2" ,
# omegaconf 2+ required by lightning, 2.0.1+ required by hydra-core
"omegaconf>=2.0.1,<3" ,
# pytest 6.2+ required for pytest.MonkeyPatch
"pytest>=6.2,<8" ,
# pytest-cov 2.4+ required for pytest --cov flags
"pytest-cov>=2.4,<5" ,
# tensorboard 2.9.1+ required by lightning
"tensorboard>=2.9.1,<3" ,
]
all = [
"torchgeo[datasets,docs,style,tests]" ,
]
[ project . urls ]
Homepage = "https://github.com/microsoft/torchgeo"
Documentation = "https://torchgeo.readthedocs.io"
2021-05-12 04:54:53 +03:00
[ tool . black ]
2023-04-16 04:27:51 +03:00
target-version = [ "py39" , "py310" ]
2021-07-05 01:03:27 +03:00
color = true
2021-11-13 22:56:29 +03:00
skip_magic_trailing_comma = true
2021-07-04 23:52:12 +03:00
2021-12-04 01:40:50 +03:00
[ tool . coverage . report ]
# Ignore warnings for overloads
# https://github.com/nedbat/coveragepy/issues/970#issuecomment-612602180
exclude_lines = [
"pragma: no cover" ,
"@overload" ,
]
2021-07-05 01:03:27 +03:00
[ tool . isort ]
profile = "black"
2021-12-24 23:47:54 +03:00
known_first_party = [ "docs" , "tests" , "torchgeo" , "train" ]
2021-07-05 01:03:27 +03:00
skip_gitignore = true
color_output = true
2021-07-04 23:52:12 +03:00
[ tool . mypy ]
2023-04-16 04:27:51 +03:00
python_version = "3.9"
2021-07-04 23:52:12 +03:00
ignore_missing_imports = true
show_error_codes = true
2022-06-30 08:25:59 +03:00
exclude = "(build|data|dist|docs/src|images|logo|logs|output)/"
2021-07-04 23:52:12 +03:00
# 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
2021-07-16 20:20:08 +03:00
[ tool . pydocstyle ]
convention = "google"
2021-12-28 23:56:14 +03:00
match_dir = "(datamodules|datasets|losses|models|samplers|torchgeo|trainers|transforms)"
2021-07-16 20:20:08 +03:00
2021-06-24 19:02:23 +03:00
[ tool . pytest . ini_options ]
2021-08-21 01:07:14 +03:00
# Skip slow tests by default
addopts = "-m 'not slow'"
2021-12-30 23:46:27 +03:00
# https://docs.pytest.org/en/latest/how-to/capture-warnings.html
2021-07-27 20:06:12 +03:00
filterwarnings = [
2022-06-13 20:38:17 +03:00
# Treat all warnings as errors
"error" ,
2021-12-30 23:46:27 +03:00
# Warnings raised by dependencies of dependencies, out of our control
2022-06-18 18:00:45 +03:00
# https://github.com/Cadene/pretrained-models.pytorch/issues/221
"ignore:.* is deprecated and will be removed in Pillow 10:DeprecationWarning:pretrainedmodels.datasets.utils" ,
2022-06-13 20:38:17 +03:00
# https://github.com/pytorch/vision/pull/5898
2022-06-18 18:00:45 +03:00
"ignore:.* is deprecated and will be removed in Pillow 10:DeprecationWarning:torchvision.transforms.functional_pil" ,
2023-03-22 15:26:45 +03:00
"ignore:.* is deprecated and will be removed in Pillow 10:DeprecationWarning:torchvision.transforms._functional_pil" ,
2022-06-13 20:38:17 +03:00
# https://github.com/rwightman/pytorch-image-models/pull/1256
2022-06-18 18:00:45 +03:00
"ignore:.* is deprecated and will be removed in Pillow 10:DeprecationWarning:timm.data" ,
2022-06-13 20:38:17 +03:00
# https://github.com/pytorch/pytorch/issues/72906
# https://github.com/pytorch/pytorch/pull/69823
2023-07-01 00:37:33 +03:00
"ignore:distutils Version classes are deprecated. Use packaging.version instead:DeprecationWarning" ,
2022-07-11 08:30:48 +03:00
"ignore:The distutils package is deprecated and slated for removal in Python 3.12:DeprecationWarning:torch.utils.tensorboard" ,
2022-09-08 07:29:12 +03:00
# https://github.com/Lightning-AI/lightning/issues/13256
# https://github.com/Lightning-AI/lightning/pull/13261
2022-06-18 18:00:45 +03:00
"ignore:torch.distributed._sharded_tensor will be deprecated:DeprecationWarning:torch.distributed._sharded_tensor" ,
2022-08-03 02:39:10 +03:00
# https://github.com/Lightning-AI/lightning/issues/13989
2023-03-16 19:14:48 +03:00
"ignore:SelectableGroups dict interface is deprecated. Use select.:DeprecationWarning:lightning.pytorch.trainer.connectors.callback_connector" ,
2022-09-08 07:29:12 +03:00
# https://github.com/Lightning-AI/lightning/issues/14594
2023-03-16 19:14:48 +03:00
"ignore:To copy construct from a tensor, it is recommended to use:UserWarning:lightning.pytorch.core.module" ,
2022-06-18 18:00:45 +03:00
# 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" ,
2022-07-09 19:32:38 +03:00
# https://github.com/tensorflow/tensorboard/issues/5798
"ignore:Call to deprecated create function:DeprecationWarning:tensorboard.compat.proto" ,
2022-07-11 08:30:48 +03:00
# https://github.com/treebeardtech/nbmake/issues/68
'ignore:The \(fspath. py.path.local\) argument to NotebookFile is deprecated:pytest.PytestDeprecationWarning:nbmake.pytest_plugin' ,
2022-12-30 20:31:00 +03:00
# 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" ,
2023-01-23 08:37:24 +03:00
# 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" ,
2023-01-25 02:23:14 +03:00
# https://github.com/lanpa/tensorboardX/pull/677
"ignore:ANTIALIAS is deprecated and will be removed in Pillow 10:DeprecationWarning:tensorboardX.summary" ,
2023-02-15 01:21:46 +03:00
# https://github.com/Lightning-AI/lightning/issues/16756
2023-03-16 19:14:48 +03:00
"ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning" ,
2021-12-30 23:46:27 +03:00
# Expected warnings
2023-03-16 19:14:48 +03:00
# Lightning warns us about using num_workers=0, but it's faster on macOS
2021-12-30 22:54:47 +03:00
"ignore:The dataloader, .*, does not have many workers which may be a bottleneck:UserWarning" ,
2023-03-22 15:26:45 +03:00
# Lightning warns us about using the CPU when GPU/MPS is available
2022-06-18 18:00:45 +03:00
"ignore:GPU available but not used.:UserWarning" ,
2023-03-22 15:26:45 +03:00
"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" ,
2023-02-18 20:03:47 +03:00
# 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" ,
2021-12-30 23:46:27 +03:00
# Unexpected warnings, worth investigating
2023-03-16 19:14:48 +03:00
# Lightning is having trouble inferring the batch size for ChesapeakeCVPRDataModule and CycloneDataModule for some reason
2021-12-30 22:54:47 +03:00
"ignore:Trying to infer the `batch_size` from an ambiguous collection:UserWarning" ,
2021-07-27 20:06:12 +03:00
]
2021-08-21 00:38:37 +03:00
markers = [
"slow: marks tests as slow" ,
]
2021-08-21 01:07:14 +03:00
norecursedirs = [
2021-08-25 03:47:55 +03:00
".ipynb_checkpoints" ,
2021-08-21 01:07:14 +03:00
"data" ,
"__pycache__" ,
]
testpaths = [
"tests" ,
"docs/tutorials" ,
]
2023-07-01 00:37:33 +03:00
# 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*" ]