torchgeo/pyproject.toml

89 строки
2.7 KiB
TOML

[build-system]
requires = [
"setuptools>=42",
"wheel",
]
build-backend = "setuptools.build_meta"
[tool.black]
target-version = ["py36", "py37", "py38", "py39"]
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]
ignore_missing_imports = true
show_error_codes = true
exclude = "(build|data|dist|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 = [
# Warnings raised by dependencies of dependencies, out of our control
# https://github.com/tensorflow/tensorboard/pull/5138
"ignore:.*is a deprecated alias for the builtin:DeprecationWarning",
"ignore:.*Create unlinked descriptors is going to go away:DeprecationWarning",
# Expected warnings
# Kornia fixed a bug in bbox handling, but there's no way to suppress the warning
"ignore:Previous behaviour produces incorrect box coordinates:UserWarning",
# pytorch-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",
# pytorch-lightning warns us if a GPU is available but isn't being used
"ignore:GPU available but not used:UserWarning",
# Unexpected warnings, worth investigating
# pytorch-lightning warns us not to use shuffle=True with val/test dataloader, but we aren't...
# Warning only raised for GeoSamplers, need to investigate
"ignore:Your `.*_dataloader` has `shuffle=True`:UserWarning",
# pytorch-lightning is having trouble inferring the batch size for CycloneDataModule for some reason
"ignore:Trying to infer the `batch_size` from an ambiguous collection:UserWarning",
]
markers = [
"slow: marks tests as slow",
]
norecursedirs = [
".ipynb_checkpoints",
"data",
"__pycache__",
]
testpaths = [
"tests",
"docs/tutorials",
]