-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
4fc249e
commit 978ce9f
Showing
1 changed file
with
130 additions
and
127 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 = "hydrosignatures" | ||
description = "A collection of tools for computing hydrological signatures" | ||
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", | ||
|
@@ -36,35 +38,39 @@ dependencies = [ | |
"numpy>=1.21", | ||
"pandas>=1", | ||
"scipy", | ||
"xarray>=2023.01", | ||
"xarray>=2023.1", | ||
] | ||
[project.optional-dependencies] | ||
speedup = [ | ||
optional-dependencies.speedup = [ | ||
"numba>=0.57", | ||
"numbagg", | ||
] | ||
test = [ | ||
optional-dependencies.test = [ | ||
"pytest-cov", | ||
"pytest-sugar", | ||
"pytest-xdist[psutil]", | ||
] | ||
[project.urls] | ||
CI = "https://github.com/hyriver/hydrosignatures/actions" | ||
Changelog = "https://docs.hyriver.io/changelogs/hydrosignatures.html" | ||
Homepage = "https://docs.hyriver.io/readme/hydrosignatures.html" | ||
Issues = "https://github.com/hyriver/hydrosignatures/issues" | ||
urls.Changelog = "https://docs.hyriver.io/changelogs/hydrosignatures.html" | ||
urls.CI = "https://github.com/hyriver/hydrosignatures/actions" | ||
urls.Homepage = "https://docs.hyriver.io/readme/hydrosignatures.html" | ||
urls.Issues = "https://github.com/hyriver/hydrosignatures/issues" | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
license-files = ["LICENSE"] | ||
platforms = ["any"] | ||
license-files = [ | ||
"LICENSE", | ||
] | ||
platforms = [ | ||
"any", | ||
] | ||
zip-safe = false | ||
|
||
[tool.setuptools.package-data] | ||
hydrosignatures = ["py.typed"] | ||
hydrosignatures = [ | ||
"py.typed", | ||
] | ||
|
||
[tool.setuptools.packages] | ||
find = {namespaces = false} | ||
find = { namespaces = false } | ||
|
||
[tool.setuptools_scm] | ||
fallback_version = "999" | ||
|
@@ -78,122 +84,105 @@ line-length = 100 | |
|
||
[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", | ||
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] | ||
known-first-party = [ | ||
lint.isort.known-first-party = [ | ||
"async_retriever", | ||
"pygeoogc", | ||
"pygeoutils", | ||
|
@@ -205,6 +194,16 @@ known-first-party = [ | |
"pygridmet", | ||
"pynldas2", | ||
] | ||
lint.pydocstyle.convention = "numpy" | ||
lint.ignore = [ | ||
"D103", | ||
"D105", | ||
"E501", | ||
# conflict with ruff-formatter | ||
"ISC001", | ||
"PLR0913", | ||
"PLR2004", | ||
] | ||
|
||
[tool.codespell] | ||
skip = "__pycache__,_build,.mypy_cache,.git,./htmlcov,.nox,**/us_abbrs.py,cache" | ||
|
@@ -223,7 +222,7 @@ filterwarnings = [ | |
] | ||
testpaths = [ | ||
"tests", | ||
"hydrosignatures" | ||
"hydrosignatures", | ||
] | ||
markers = [ | ||
"speedup: Tests that require numba>=0.57", | ||
|
@@ -232,27 +231,31 @@ markers = [ | |
[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 = ['hydrosignatures'] | ||
source = [ | ||
'hydrosignatures', | ||
] | ||
|
||
[tool.pyright] | ||
exclude = [ | ||
".nox/", | ||
"**/__pycache__", | ||
"**/__init__.py", | ||
"tests/" | ||
"tests/", | ||
] | ||
include = [ | ||
"hydrosignatures", | ||
] | ||
include = ["hydrosignatures"] | ||
reportMissingTypeStubs = false | ||
reportUnknownArgumentType = false | ||
reportUnknownLambdaType = false | ||
|