-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
264 lines (241 loc) · 7.66 KB
/
pyproject.toml
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "coincident"
authors = [
{ name = "Scott Henderson", email = "[email protected]" },
{ name = "David Shean", email = "[email protected]" },
{ name = "Jack Hayes", email = "[email protected]" },
]
description = "Search and analysis of STV Precursor Coincident Datasets"
readme = "README.md"
license.file = "LICENSE"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = [
#"aiohttp>=3.10.6,<4",
"cloudpathlib[s3]>=0.20.0,<0.21",
#"fsspec>=2024.9.0,<2025",
"geopandas>=1.0.1,<2",
"maxar-platform>=1.0.2,<2",
"planetary-computer>=1.0.0,<2",
"pyarrow>=18.0.0,<19",
"pystac-client>=0.8.3,<0.9",
"requests>=2.32.3,<3",
"rioxarray>=0.17.0,<0.18",
"stac-asset>=0.4.3,<0.5",
"stac-geoparquet>=0.6.0,<0.7",
"odc-stac>=0.3.10,<0.4",
]
[project.optional-dependencies]
dev = [
"ipykernel>=6.29.5,<7",
"mypy>=1.11.2,<2",
"pre-commit>=3.8.0,<4",
"pylint>=3.3.1,<4",
"pytest >=6",
"pytest-cov >=3",
]
docs = [
"folium", # comes w/ geopandas on conda-forge but not pypi
#"furo>=2023.08.17",
"mapclassify",
"matplotlib",
"myst-nb",
"myst_parser>=0.13",
"pydata-sphinx-theme>=0.16.0,<0.17",
#"rpds-py>=0.21.0,<0.22",
"sphinx>=7.0",
"sphinx_autodoc_typehints",
"sphinx_copybutton",
]
# all = [
# "matplotlib-base>=3.9.2,<4",
# "sliderule>=4.7.1,<5"
# ]
[project.urls]
Homepage = "https://github.com/uw-cryo/coincident"
"Bug Tracker" = "https://github.com/uw-cryo/coincident/issues"
Discussions = "https://github.com/uw-cryo/coincident/discussions"
Changelog = "https://github.com/uw-cryo/coincident/releases"
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/coincident/_version.py"
[tool.hatch.envs.default]
features = ["test"]
scripts.test = "pytest {args}"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = [
"error",
# NOTE: try to remove with maxar-platform>1.0.1
"ignore::DeprecationWarning:lark",
"ignore:maxar_plaform authentication error:UserWarning",
# https://github.com/microsoft/planetary-computer-sdk-for-python/issues/58
"ignore::pydantic.warnings.PydanticDeprecatedSince20",
"ignore:Inheritance class OAuth2Client from ClientSession is discouraged:DeprecationWarning",
# sliderule datetime.datetime.utcnow() is deprecated...
"ignore::DeprecationWarning:sliderule",
# Optional imports
"ignore:Unable to authenticate with Maxar API:UserWarning",
"ignore:.* package not found:UserWarning",
]
log_cli_level = "INFO"
testpaths = [
"tests",
]
markers = [
"network: marks test requiring internet (select with -o markers=network)",
]
[tool.coverage]
run.source = ["coincident"]
report.exclude_also = [
'\.\.\.',
'if typing.TYPE_CHECKING:',
]
[tool.codespell]
# Ignore notebooks with output cells
skip="pixi.lock,docs/examples/sliderule.ipynb,docs/examples/contextual_data.ipynb"
[tool.mypy]
files = ["src", "tests"]
warn_unused_configs = true
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
# NOTE: not sure why mypy not finding dependency libraries, so disabling this check...
# error: Cannot find implementation or library stub for module named "geopandas" [import-not-found]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "coincident.*"
disallow_untyped_defs = true
disallow_incomplete_defs = true
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
ignore = [
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"ISC001", # Conflicts with formatter
"PLC0414", # explicit re-export
"PD901", # df for DataFrame
]
exclude = [
"docs/*.ipynb",
]
isort.required-imports = ["from __future__ import annotations"]
# Uncomment if using a _compat.typing backport
# typing-modules = ["coincident._compat.typing"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["T20"]
[tool.pylint]
ignore-paths = [".*/_version.py"]
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
messages_control.disable = [
"design",
"fixme",
"line-too-long",
"missing-module-docstring",
"missing-function-docstring",
"wrong-import-position",
"C0103", # Allow ALLCAPS variable names
"W0212", # Access to a protected member
"W0102", # Dangerous default value as argument []
]
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["osx-arm64", "linux-64"]
[tool.pixi.environments]
default = { solve-group = "default" }
dev = { features = ["dev"], solve-group = "default" }
docs = { features = ["docs"], solve-group = "default" }
# NOTE: pixi will match project.dependencies versions above but get them from conda-forge
# If a package is listed in project.dependencies but not repeated here, it is installed from pypi
[tool.pixi.dependencies]
python = "<3.13" # https://github.com/stac-utils/stac-geoparquet/issues/81
#aiohttp = "*"
#fsspec = "*"
geopandas = "*"
planetary-computer = "*"
pystac-client = "*"
requests = "*"
rioxarray = "*"
# stac-asset = "*" # not on conda-forge
#s3fs = "*"
stac-geoparquet = "*"
pyarrow = "*"
jsonschema = ">=4.23.0,<5"
libgdal-arrow-parquet = ">=3.10.0,<4"
odc-stac = "*"
#nbconvert = ">=7.16.4,<8"
#cloudpathlib-s3 = ">=0.20.0,<0.21"
#matplotlib-base = ">=3.9.2,<4"
#sliderule = ">=4.7.1,<5"
[tool.pixi.feature.dev.dependencies]
# NOTE: ipykernel to run notebooks in vscode
ipykernel = ">=6.29.5,<7"
# Bug if=*? Because you require pre-commit>=3.8.0,<4 and pre-commit==4.0.0, we can conclude that your requirements are unsatisfiable.
pre-commit = "<4"
pylint = "*"
pytest = "*"
mypy = "*"
# Testing additional dependencies
#rich = ">=13.8.1,<14" # Optional. convenient for rich.print(dataset)
#xvec = ">=0.3.0,<0.4"
sliderule = ">=4.7.1,<5"
[tool.pixi.pypi-dependencies]
coincident = { path = ".", editable = false }
#cloudpathlib = { version = "0.20.0,<0.21", extras = ["s3"]}
[tool.pixi.feature.dev.pypi-dependencies]
coincident = { path = ".", editable = true }
[tool.pixi.feature.dev.tasks]
precommit = "pre-commit run --all"
# NOTE: consider --output-format=github for github actions
lint = "pylint src"
test = "pytest -o markers=network -m 'not network' --cov --cov-report=xml --cov-report=term"
networktest = "pytest --cov --cov-report=xml --cov-report=term"
[tool.pixi.feature.docs.pypi-dependencies]
coincident = { path = ".", editable = true }
[tool.pixi.feature.docs.tasks]
docs = "python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs docs/_build/html"