-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpyproject.toml
More file actions
198 lines (180 loc) · 5.26 KB
/
pyproject.toml
File metadata and controls
198 lines (180 loc) · 5.26 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
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
[build-system]
requires = ["setuptools>=64.0", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "opera-utils"
authors = [
{ name = "Scott Staniewicz", email = "scott.j.staniewicz@jpl.nasa.gov" },
]
description = "Miscellaneous utilities for working with OPERA data products"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.9"
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
license = { file = "LICENSE.txt" }
dependencies = [
"h5py>=1.10",
"numpy>=1.24",
"pooch>=1.7",
"pyproj>=3.3",
"shapely>=1.8",
"typing_extensions>=4",
"tyro>=0.9",
]
# The version will be written into a version.py upon install, auto-generated
# see section: setuptools_scm
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata
# dependencies will be read from text files
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/opera-adt/opera-utils"
"Bug Tracker" = "https://github.com/opera-adt/opera-utils/issues"
Discussions = "https://github.com/opera-adt/opera-utils/discussions"
Changelog = "https://github.com/opera-adt/opera-utils/releases"
# Entry points for the command line interface
[project.scripts]
opera-utils = "opera_utils.cli:cli_app"
# extra requirements: `pip install .[docs]` or `pip install .[test]`
[project.optional-dependencies]
# For geopandas functionality with burst/frame databases:
geopandas = ["geopandas", "pyogrio"]
# Work with DISP data - downloads and subsetting
disp = [
"affine",
"aiohttp",
"botocore",
"dask",
"fsspec",
"h5netcdf",
"s3fs",
"tqdm",
"rasterio",
"rioxarray",
"xarray",
"zarr>=3",
]
tropo = ["opera-utils[disp]", "rioxarray", "scipy"]
asf = ["asf_search"]
# Work with NISAR GSLC data - downloads and subsetting
nisar = [
"aiohttp",
"fsspec",
"s3fs",
"tqdm",
]
all = ["opera-utils[tropo,asf,disp,geopandas,nisar]"]
test = [
"asf_search",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-randomly",
"pytest-recording",
"pytest-xdist",
"ruff",
"geopandas",
"pyogrio",
"ipywidgets",
"matplotlib",
]
docs = [
"mkdocs",
"mkdocs-gen-files",
"mkdocs-jupyter",
"mkdocs-literate-nav",
"mkdocs-material",
"mkdocs-section-index",
"mkdocstrings[python]",
"pybtex", # for mdx_bib
"pymdown-extensions",
]
[tool.setuptools_scm]
# https://github.com/pypa/setuptools_scm#configuration-parameters
write_to = "src/opera_utils/_version.py"
# https://github.com/pypa/setuptools_scm#version-number-construction
version_scheme = "no-guess-dev" # Will not guess the next version
[tool.ruff]
src = ["src"]
unsafe-fixes = true
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle (errors)
"W", # pycodestyle (warnings)
"EM", # flake8-errmsg
"EXE", # flake8-executable
"F", # Pyflakes
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"NPY201", # numpy 2.0 depgrcations
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # Pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"TRY", # tryceratops
"UP", # pyupgrade <- not working with Pydantic lower python versions
"YTT", # flake8-2020
]
ignore = [
"PTH123", # `open()` should be replaced by `Path.open()`
"PLR", # Pylint Refactor
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D102", # D102: Missing docstring in public method (TODO: remove this ignore)
"D213", # D213: Multi-line docstring summary should start at the second line
"D203", # 1 blank line required before class docstring
"N806", # Variable _ in function should be lowercase
"SIM108", # Use ternary operator
]
[tool.ruff.lint.per-file-ignores]
"src/opera_utils/cli.py" = ["PLC0415"]
"**/__init__.py" = ["F401", "F403"]
"tests/**" = [
"D",
"N",
"PTH",
"ARG001",
"PLR2004",
"E501",
"PLC0415",
"PLC2701",
]
"src/opera_utils/datasets.py" = ["E501"] # Line too long
"scripts/*" = ["F401", "PLC2701"]
"docs/notebooks/*" = ["B018", "E402", "E501"]
[tool.black]
target-version = ["py39", "py310", "py311", "py312", "py313"]
preview = true
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
[tool.pytest.ini_options]
doctest_optionflags = "NORMALIZE_WHITESPACE NUMBER"
addopts = " --cov=opera_utils --doctest-modules --randomly-seed=1234 --ignore=scripts --ignore=docs --ignore=data"
filterwarnings = [
"error",
# https://github.com/dateutil/dateutil/pull/1285 will be released, but not yet
"ignore:datetime.datetime.utcfromtimestamp.*:DeprecationWarning",
"ignore:.*shapely.geos.*:DeprecationWarning",
]