-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathpyproject.toml
More file actions
153 lines (141 loc) · 3.95 KB
/
Copy pathpyproject.toml
File metadata and controls
153 lines (141 loc) · 3.95 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[build-system]
requires = ["setuptools>64", "numpy>=2.0"]
build-backend = "setuptools.build_meta"
[project]
name = "pywatershed"
description = "pywatershed is a Python package for hydrologic modeling"
authors = [
{ name = "USGS Development and Standards Team", email = "modflow@usgs.gov" },
]
maintainers = [
{ name = "James L. McCreight", email = "jmccreight@usgs.gov" },
]
keywords = ["hydrology", "PRMS"]
license = { text = "CC0" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Hydrology",
]
requires-python = ">=3.12,<3.14"
dependencies = [
"contextily",
"numpy>=2.0.0",
"matplotlib >=1.4.0",
"epiweeks",
"flopy[codegen]",
"geopandas",
"netCDF4",
"networkx",
"numba",
"pandas >= 1.4.0",
"pint",
"pyPRMS >=0.10.0",
"pyyaml",
"tqdm",
"xarray >= 2023.5.0",
"xmltodict",
"xyzservices",
]
dynamic = ["version", "readme"]
[project.optional-dependencies]
lint = ["cffconvert", "click", "ruff", "flynt", "pre-commit"]
test = [
"pywatershed[lint]",
"coverage",
"flaky",
"filelock",
"modflow-devtools[dfn]==1.7.0",
"pre-commit",
"pytest!=8.1.0",
"pytest-cov",
"pytest-env",
"pytest-error-for-skips",
"pytest-order",
"pytest-xdist",
]
optional = [
"pydot",
"geos",
"cartopy",
"folium",
"geopandas",
"hvplot",
"shapely",
"ipython",
"jupyter",
"jupyterlab",
"pyvis",
]
doc = [
"ipython",
"jinja2<3.1",
"sphinx<9.0",
"sphinx-book-theme>=0.3.3",
"sphinx-autodoc-typehints>=2.2.1",
"sphinx-autosummary-accessors",
"sphinx-copybutton",
]
all = ["pywatershed[lint, test, optional, doc]"]
[project.urls]
Documentation = "https://pywatershed.readthedocs.io"
"Bug Tracker" = "https://github.com/DOI-USGS/pywatershed/issues"
"Source Code" = "https://github.com/DOI-USGS/pywatershed"
[tool.setuptools]
include-package-data = true
zip-safe = false
[tool.setuptools.dynamic]
version = { attr = "pywatershed.version.__version__" }
readme = { file = ["README.md"], content-type = "text/markdown" }
[tool.setuptools.packages.find]
include = ["pywatershed", "pywatershed.*"]
[tool.setuptools.package-data]
"pywatershed.static.metadata" = ["*.yaml"]
"pywatershed.data.drb_2yr" = ["*"]
"pywatershed.data" = [
"big_sandy_starfit_parameters.nc",
"flaming_gorge_grand_reservoirs.gpkg"
]
[tool.ruff]
line-length = 79
target-version = "py313"
include = [
"pyproject.toml",
"pywatershed/**/*.py",
"autotest/**/*.py",
"examples/**/*.py",
"test_data/**/*.py",
"docs/**/*.py",
"**/*.ipynb",
]
[tool.ruff.lint]
select = ["F", "E", "I001"]
ignore = [
# "F401", # unused import
]
[tool.ruff.lint.per-file-ignores]
# Notebooks are narrative, so two rules are relaxed for them:
# E501 - wrapping cells to 79 columns hurts readability and churns
# diffs for no correctness gain.
# I001 - several notebooks import a module purely for its side effect
# (e.g. hvplot.xarray registers a .hvplot accessor) and must do
# so after the module it extends. Sorting moves those imports
# above their dependency.
# Everything else applies, including F401; annotate a deliberate
# side-effect import with `# noqa: F401` and a comment saying why.
"**/*.ipynb" = ["E501", "I001"]
[tool.ruff.format]
# Notebooks are linted but not auto-formatted. The formatter wraps to
# line-length regardless of the E501 exemption above, which would reflow
# every cell in every notebook. Excluding them keeps `ruff format --check .`
# green without that churn.
exclude = ["**/*.ipynb"]
# this is maintained for some editors
# that dont yet support ruff
[tool.black]
line-length = 79
target_version = ["py313"]