2021-05-21 06:22:30 +03:00
|
|
|
[build-system]
|
|
|
|
requires = [
|
2022-06-18 18:00:45 +03:00
|
|
|
# setuptools 42+ required for metadata.license_files support in setup.cfg
|
2023-01-17 01:18:53 +03:00
|
|
|
"setuptools>=42,<67",
|
2021-05-21 06:22:30 +03:00
|
|
|
]
|
|
|
|
build-backend = "setuptools.build_meta"
|
2021-07-04 23:52:12 +03:00
|
|
|
|
2021-05-12 04:54:53 +03:00
|
|
|
[tool.black]
|
2022-03-29 21:58:46 +03:00
|
|
|
target-version = ["py37", "py38", "py39"]
|
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]
|
|
|
|
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",
|
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
|
2022-06-18 18:00:45 +03:00
|
|
|
"ignore:distutils Version classes are deprecated. Use packaging.version instead:DeprecationWarning:torch.utils.tensorboard",
|
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
|
|
|
|
"ignore:SelectableGroups dict interface is deprecated. Use select.:DeprecationWarning:pytorch_lightning.trainer.connectors.callback_connector",
|
2022-09-08 07:29:12 +03:00
|
|
|
# https://github.com/Lightning-AI/lightning/issues/14594
|
|
|
|
"ignore:To copy construct from a tensor, it is recommended to use:UserWarning:pytorch_lightning.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-24 23:13:08 +03:00
|
|
|
# https://github.com/lanpa/tensorboardX/issues/653
|
|
|
|
# https://github.com/lanpa/tensorboardX/pull/654
|
|
|
|
"ignore:Call to deprecated create function:DeprecationWarning:tensorboardX",
|
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",
|
2021-12-30 23:46:27 +03:00
|
|
|
|
|
|
|
# Expected warnings
|
|
|
|
# pytorch-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",
|
2022-06-18 18:00:45 +03:00
|
|
|
# pytorch-lightning warns us about using the CPU when a GPU is available
|
|
|
|
"ignore:GPU available but not used.:UserWarning",
|
2021-12-30 23:46:27 +03:00
|
|
|
|
|
|
|
# Unexpected warnings, worth investigating
|
2022-06-13 20:38:17 +03:00
|
|
|
# pytorch-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",
|
|
|
|
]
|