-
Notifications
You must be signed in to change notification settings - Fork 13
/
pyproject.toml
210 lines (186 loc) · 4.9 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
[project]
name = "hazard"
version = "0.1.0"
description = "OS-Climate Physical Risk Hazard Indicator Generation"
authors = [
{name = "Joe Moorhouse",email = "[email protected]"},
]
requires-python = ">=3.9,<3.11"
readme = "README.md"
license = {file = "LICENSE"}
keywords = ["Physical", "Climate", "Risk", "Finance"]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.9",
"Topic :: Office/Business :: Financial",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
]
dependencies = [
"cftime>=1.6.3,<2.0.0",
"dask[distributed]>=2023.5.0,<2023.6.0",
"fire>=0.6.0,<1.0.0",
"fsspec>=2024.3.1,<2024.4.0",
"geopandas>=0.13.2,<1.0.0",
"h5netcdf>=1.1.0,<2.0.0",
"mapbox>=0.18.1,<1.0.0",
"matplotlib>=3.7.5,<4.0.0",
"mercantile>=1.2.1,<2.0.0",
"mkdocs>=1.5.3,<2.0.0",
"numpy>=1.24.4,<2.0.0",
"python-dotenv>=1.0.1,<2.0.0",
"pyproj>=3.5.0,<4.0.0",
"pydantic>=2.6.4,<3.0.0",
"pystac>=1.10.0,<2.0.0",
"pystac-client>=0.7.6,<1.0.0",
"pymdown-extensions>=10.7.1,<11.0.0",
"rasterio>=1.4b1,<2.0.0",
"rioxarray>=0.13.4,<1.0.0",
"seaborn>=0.13.2,<1.0.0",
"shapely>=2.0.3,<3.0.0",
"s3fs>=2024.3.1,<2024.4.0",
"xarray>=2023.1.0,<2023.2.0",
"xclim>=0.47.0,<1.0.0",
"zarr>=2.16.1,<3.0.0",
"cartopy>=0.23.0",
]
[project.urls]
Homepage = "https://github.com/os-climate/hazard"
Repository = "https://github.com/os-climate/hazard"
Downloads = "https://github.com/os-climate/hazard/releases"
"Bug Tracker" = "https://github.com/os-climate/hazard/issues"
Documentation = "https://github.com/os-climate/hazard/tree/main/docs"
"Source Code" = "https://github.com/os-climate/hazard"
[metadata]
license-files = ["LICENSE"]
[build-system]
requires = [
"setuptools>=42",
"wheel",
"pdm"
]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
include = ["hazard*"]
[tool.setuptools.package-data]
hazard = [
"models/*.md",
"onboard/*.md"
]
[tool.pdm.dev-dependencies]
test = [
"pdm[pytest]",
"pytest",
"pytest-cov",
"sphinx-pyproject"
]
lint = [
"mypy",
"pre-commit",
"ruff",
]
[tool.pdm.scripts]
pre_release = "scripts/dev-versioning.sh"
release = "scripts/release-versioning.sh"
test = "pytest"
docs = { shell = "cd docs && mkdocs serve", help = "Start the dev server for doc preview" }
lint = "pre-commit run --all-files"
mypy = { cmd = "mypy --install-types --non-interactive src" }
all = {composite = ["lint", "mypy", "pytest"]}
complete = { call = "tasks.complete:main", help = "Create autocomplete files for bash and fish" }
[tool.pytest.ini_options]
testpaths = "tests"
addopts = "-v"
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
#addopts = "--cov --cov-report html --cov-report term-missing --cov-fail-under 95"
[tool.mypy]
warn_unreachable = true
ignore_missing_imports = true
[tool.coverage.run]
source = "src"
omit = "tests/*"
relative_files = true
[project.scripts]
os_climate_hazard = "hazard.cli:cli"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
[tool.ruff.lint]
extend-fixable = [
# Instead of trailing-whitespace
"W291", "W293"
]
extend-select = [
# Instead of pydocstyle
"D",
#Instead of flake8
"E", "F", "B",
# Instead of pep8-naming
"N",
# Instead of flake8-debugger or debug-statements
"T10",
]
ignore = [
"E203",
"E501",
# Avoid incompatible rules
"D203",
"D213",
# Ignore this rules so that precommit passes. Uncomment to start fixing them
"B006", "B008", "B904", "B012", "B024", "B020",
"D",
"F401", "F811",
]
[tool.ruff.lint.extend-per-file-ignores]
# Ignore `D` rules everywhere except for the `src/` directory.
"!src/**.py" = ["D"]
[tool.ruff.lint.pycodestyle]
max-line-length = 120
[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 = "dynamic"