forked from DOI-USGS/dataretrieval-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
121 lines (109 loc) · 3.3 KB
/
Copy pathpyproject.toml
File metadata and controls
121 lines (109 loc) · 3.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "dataretrieval"
description = "Discover and retrieve water data from U.S. federal hydrologic web services."
readme = "README.md"
requires-python = ">=3.9"
keywords = ["USGS", "water data"]
license = "CC0-1.0"
license-files = ["LICENSE.md"]
authors = [
{name = "Timothy Hodson", email = "thodson@usgs.gov"},
]
maintainers = [
{name = "Elise Hinman", email = "ehinman@usgs.gov"},
]
classifiers = [
"Programming Language :: Python :: 3",
]
dependencies = [
"httpx",
"pandas>=2.0.0,<4.0.0",
]
dynamic = ["version"]
[tool.setuptools]
packages = ["dataretrieval", "dataretrieval.codes"]
[tool.setuptools.package-data]
dataretrieval = ["py.typed"]
[project.optional-dependencies]
# Minimal set the CI ``type-check`` job installs — just mypy + the package,
# not the whole test stack.
type-check = [
"mypy<2", # <2 so it can still target Python 3.9 (the project's floor)
]
test = [
"pytest > 5.0.0",
"pytest-cov[all]",
"pytest-rerunfailures",
"coverage",
"pytest-httpx",
"ruff",
"dataretrieval[type-check]", # mypy, pinned once in the type-check extra
]
doc = [
"docutils<0.22",
"sphinx",
"sphinx-rtd-theme",
"nbsphinx",
"nbsphinx_link",
"ipython",
"ipykernel",
"matplotlib",
"folium>=0.12",
# WaterData_demo.ipynb uses ``.set_crs().explore()`` on geometry-bearing
# frames; without geopandas the call raises ``AttributeError`` on plain
# pandas DataFrames. ``mapclassify`` is required by ``geopandas.explore()``
# (alongside ``folium`` + ``matplotlib`` above). Mirrors the same lower
# bound as the [nldi] extra.
"geopandas>=0.10",
"mapclassify",
]
nldi = [
'geopandas>=0.10'
]
[project.urls]
homepage = "https://github.com/DOI-USGS/dataretrieval-python"
documentation = "https://doi-usgs.github.io/dataretrieval-python/"
repository = "https://github.com/DOI-USGS/dataretrieval-python.git"
[tool.setuptools_scm]
write_to = "dataretrieval/_version.py"
[tool.ruff]
target-version = "py39"
extend-exclude = ["demos"]
[tool.ruff.lint]
preview = true
# Select rules: Pyflakes(F), pycodestyle(E,W), isort(I), pyupgrade(UP),
# flake8-bugbear(B), flake8-quotes(Q), flake8-simplify(SIM), flake8-tidy-imports(TID)
select = [
"F", "E", "W", "I", "UP", "B", "Q", "SIM", "TID",
"C90", # mccabe
"E501", # line-length
]
ignore = [
"SIM105", # Use `contextlib.suppress(...)` instead of `try-except-pass`
"SIM117", # Use a single `with` statement with multiple contexts
]
[tool.ruff.lint.mccabe]
max-complexity = 20
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["SIM108"]
"**/__init__.py" = ["F403"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = 72
[tool.mypy]
# The package is fully annotated and passes ``mypy --strict``. The one
# remaining relaxation is ``ignore_missing_imports``: untyped third-party
# libraries (pandas, geopandas, anyio) are treated as ``Any`` instead of
# requiring stub packages. Dropping that — via pandas-stubs/types-requests and
# per-module overrides — can follow.
python_version = "3.9" # the project's minimum supported version
files = ["dataretrieval"]
strict = true
ignore_missing_imports = true