-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Taher Chegini
committed
May 16, 2024
1 parent
382764e
commit 36cb1de
Showing
1 changed file
with
135 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,10 @@ requires = [ | |
name = "pygeoutils" | ||
description = "Utilities for manipulating geospatial, (Geo)JSON, and (Geo)TIFF data." | ||
readme = "README.rst" | ||
license = {text = "MIT"} | ||
authors = [{name = "Taher Chegini", email = "[email protected]"}] | ||
license = { text = "MIT" } | ||
authors = [ | ||
{ name = "Taher Chegini", email = "[email protected]" }, | ||
] | ||
requires-python = ">=3.8" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
|
@@ -43,157 +45,140 @@ dependencies = [ | |
"scipy", | ||
"shapely>=2", | ||
"ujson", | ||
"xarray>=2023.01", | ||
"xarray>=2023.1", | ||
] | ||
[project.optional-dependencies] | ||
test = [ | ||
optional-dependencies.test = [ | ||
"pytest-cov", | ||
"pytest-sugar", | ||
"pytest-xdist[psutil]", | ||
] | ||
[project.urls] | ||
CI = "https://github.com/hyriver/pygeoutils/actions" | ||
Changelog = "https://docs.hyriver.io/changelogs/pygeoutils.html" | ||
Homepage = "https://docs.hyriver.io/readme/pygeoutils.html" | ||
Issues = "https://github.com/hyriver/pygeoutils/issues" | ||
urls.Changelog = "https://docs.hyriver.io/changelogs/pygeoutils.html" | ||
urls.CI = "https://github.com/hyriver/pygeoutils/actions" | ||
urls.Homepage = "https://docs.hyriver.io/readme/pygeoutils.html" | ||
urls.Issues = "https://github.com/hyriver/pygeoutils/issues" | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
license-files = ["LICENSE"] | ||
platforms = ["any"] | ||
license-files = [ | ||
"LICENSE", | ||
] | ||
platforms = [ | ||
"any", | ||
] | ||
zip-safe = false | ||
|
||
[tool.setuptools.package-data] | ||
pygeoutils = ["py.typed"] | ||
pygeoutils = [ | ||
"py.typed", | ||
] | ||
|
||
[tool.setuptools.packages] | ||
find = {namespaces = false} | ||
find = { namespaces = false } | ||
|
||
[tool.setuptools_scm] | ||
fallback_version = "999" | ||
|
||
[tool.ruff] | ||
target-version = "py38" | ||
lint.select = [ | ||
# flake8-bugbear | ||
"B", | ||
# flake8-comprehensions | ||
"C4", | ||
# pydocstyle | ||
"D", | ||
# Error | ||
"E", | ||
# pyflakes | ||
"F", | ||
# isort | ||
"I", | ||
# flake8-implicit-str-concat | ||
"ISC", | ||
# pep8-naming | ||
"N", | ||
# pygrep-hooks | ||
"PGH", | ||
# flake8-pytest-style | ||
"PT", | ||
# flake8-use-pathlib | ||
"PTH", | ||
# flake8-quotes | ||
"Q", | ||
# bandit | ||
"S", | ||
# flake8-simplify | ||
"SIM", | ||
# flake8-print | ||
"T20", | ||
# tryceratops | ||
"TRY", | ||
# pyupgrade | ||
"UP", | ||
# Warning | ||
"W", | ||
# flake8-2020 | ||
"YTT", | ||
# flake8-debugger | ||
"T10", | ||
# flake8-gettext | ||
"INT", | ||
# pylint | ||
"PLC", | ||
"PLE", | ||
"PLR", | ||
"PLW", | ||
# misc lints | ||
"PIE", | ||
# flake8-pyi | ||
"PYI", | ||
# tidy imports | ||
"TID", | ||
# type-checking imports | ||
"TCH", | ||
# Ruff-specific rules | ||
"RUF", | ||
# compatibility with numpy 2.0 | ||
"NPY201", | ||
] | ||
line-length = 100 | ||
|
||
exclude = [ | ||
"__pycache__", | ||
".nox", | ||
".nox", | ||
"__pycache__", | ||
] | ||
|
||
lint.ignore = [ | ||
"D103", | ||
"D105", | ||
"E501", | ||
"PLR2004", | ||
"PLR0913", | ||
# conflict with ruff-formatter | ||
"ISC001", | ||
# shell command | ||
"S605", | ||
"S607", | ||
lint.select = [ | ||
# flake8-bugbear | ||
"B", | ||
# flake8-comprehensions | ||
"C4", | ||
# pydocstyle | ||
"D", | ||
# Error | ||
"E", | ||
# pyflakes | ||
"F", | ||
# isort | ||
"I", | ||
# flake8-gettext | ||
"INT", | ||
# flake8-implicit-str-concat | ||
"ISC", | ||
# pep8-naming | ||
"N", | ||
# compatibility with numpy 2.0 | ||
"NPY201", | ||
# pygrep-hooks | ||
"PGH", | ||
# misc lints | ||
"PIE", | ||
# pylint | ||
"PLC", | ||
"PLE", | ||
"PLR", | ||
"PLW", | ||
# flake8-pytest-style | ||
"PT", | ||
# flake8-use-pathlib | ||
"PTH", | ||
# flake8-pyi | ||
"PYI", | ||
# flake8-quotes | ||
"Q", | ||
# Ruff-specific rules | ||
"RUF", | ||
# bandit | ||
"S", | ||
# flake8-simplify | ||
"SIM", | ||
# flake8-debugger | ||
"T10", | ||
# flake8-print | ||
"T20", | ||
# type-checking imports | ||
"TCH", | ||
# tidy imports | ||
"TID", | ||
# tryceratops | ||
"TRY", | ||
# pyupgrade | ||
"UP", | ||
# Warning | ||
"W", | ||
# flake8-2020 | ||
"YTT", | ||
] | ||
|
||
lint.per-file-ignores."tests/*.py" = [ | ||
"D100", | ||
"D101", | ||
"D102", | ||
"D103", | ||
"D104", | ||
"D105", | ||
"D106", | ||
"D107", | ||
# use of "eval" | ||
"PGH001", | ||
# Mutable class attributes | ||
"RUF012", | ||
# use of "assert" | ||
"S101", | ||
# use of "exec" | ||
"S102", | ||
# possible hardcoded password | ||
"S106", | ||
] | ||
lint.extend-safe-fixes = [ | ||
# absolute imports | ||
"TID252", | ||
] | ||
line-length = 100 | ||
|
||
[tool.ruff.lint.flake8-bugbear] | ||
extend-immutable-calls = [ | ||
"chr", | ||
"typer.Argument", | ||
"typer.Option", | ||
] | ||
|
||
[tool.ruff.lint.pydocstyle] | ||
convention = "numpy" | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"tests/*.py" = [ | ||
"D100", | ||
"D101", | ||
"D102", | ||
"D103", | ||
"D104", | ||
"D105", | ||
"D106", | ||
"D107", | ||
# use of "assert" | ||
"S101", | ||
# use of "exec" | ||
"S102", | ||
# possible hardcoded password | ||
"S106", | ||
# use of "eval" | ||
"PGH001", | ||
# Mutable class attributes | ||
"RUF012", | ||
lint.flake8-bugbear.extend-immutable-calls = [ | ||
"chr", | ||
"typer.Argument", | ||
"typer.Option", | ||
] | ||
|
||
[tool.ruff.lint.isort] | ||
required-imports = ["from __future__ import annotations"] | ||
known-first-party = [ | ||
lint.isort.known-first-party = [ | ||
"async_retriever", | ||
"pygeoogc", | ||
"pygeoutils", | ||
|
@@ -205,6 +190,22 @@ known-first-party = [ | |
"pygridmet", | ||
"pynldas2", | ||
] | ||
lint.isort.required-imports = [ | ||
"from __future__ import annotations", | ||
] | ||
lint.pydocstyle.convention = "numpy" | ||
lint.ignore = [ | ||
"D103", | ||
"D105", | ||
"E501", | ||
# conflict with ruff-formatter | ||
"ISC001", | ||
"PLR0913", | ||
"PLR2004", | ||
# shell command | ||
"S605", | ||
"S607", | ||
] | ||
|
||
[tool.codespell] | ||
skip = "__pycache__,_build,.mypy_cache,.git,./htmlcov,.nox,**/us_abbrs.py,cache" | ||
|
@@ -223,33 +224,37 @@ filterwarnings = [ | |
] | ||
testpaths = [ | ||
"tests", | ||
"pygeoutils" | ||
"pygeoutils", | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
'raise ServiceUnavailableError', | ||
"if TYPE_CHECKING:" | ||
"if TYPE_CHECKING:", | ||
] | ||
ignore_errors = true | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
omit = [ | ||
"**/__init__.py", | ||
"**/print_versions.py" | ||
"**/print_versions.py", | ||
] | ||
parallel = true | ||
source = ['pygeoutils'] | ||
source = [ | ||
'pygeoutils', | ||
] | ||
|
||
[tool.pyright] | ||
exclude = [ | ||
".nox/", | ||
"**/__pycache__", | ||
"**/__init__.py", | ||
"tests/" | ||
"tests/", | ||
] | ||
include = [ | ||
"pygeoutils", | ||
] | ||
include = ["pygeoutils"] | ||
reportMissingTypeStubs = false | ||
reportUnknownArgumentType = false | ||
reportUnknownLambdaType = false | ||
|