-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathpyproject.toml
254 lines (236 loc) · 7.47 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
[project]
name = "srai"
version = "0.8.4"
description = "A set of python modules for geospatial machine learning and data mining"
authors = [
{ name = "Piotr Gramacki", email = "pgramacki@kraina.ai" },
{ name = "Kacper Leśniara", email = "klesniara@kraina.ai" },
{ name = "Kamil Raczycki", email = "kraczycki@kraina.ai" },
{ name = "Szymon Woźniak", email = "swozniak@kraina.ai" },
]
# pdm add <library>
dependencies = [
"pandas",
"geopandas>=0.6",
"shapely>=2.0.1",
"h3>=4.0.0b1",
"numpy>=1.26.0",
"pyfunctional>=1.0.0",
"pyarrow>=13.0.0",
"topojson>=1.6",
"tqdm>=4.42.0",
"s2>=0.1.9",
"typeguard>=3.0.0",
"requests",
"h3ronpy>=0.20.1",
"osmnx>=1.3.0",
]
requires-python = ">=3.9"
readme = "README.md"
license = { text = "Apache-2.0" }
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: Apache Software License",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: GIS",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: Unix",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
]
[project.urls]
Homepage = "https://kraina-ai.github.io/srai"
Repository = "https://github.com/kraina-ai/srai"
Documentation = "https://kraina-ai.github.io/srai"
Changelog = "https://github.com/kraina-ai/srai/blob/main/CHANGELOG.md"
[project.optional-dependencies]
# Make sure to edit test_optional_dependencies.py:
# add entries to optional packages
# add tests
# pdm add -G osm <library>
osm = ["overpass>=0.7", "pillow>=8.0.0", "beautifulsoup4", "quackosm>=0.11.0"]
# pdm add -G voronoi <library>
voronoi = [
"pymap3d>=3.0.0",
"haversine>=2.0.0",
"scipy>=1.10.0",
"spherical-geometry>=1.3.2",
]
# pdm add -G gtfs <library>
gtfs = ["gtfs-kit"]
# pdm add -G plotting <library>
plotting = [
"folium>=0.14.0",
"mapclassify>=2.4.0",
"scikit-learn>=1.2.0",
"matplotlib>=3.2.0",
"plotly>=4.6.0",
"kaleido<=0.2.1,>=0.2.0",
] # kaleido<=0.2.1 because installation breaks on 0.2.1.post1
# pdm add -G torch <library>
torch = [
"pytorch-lightning>=2.0.0",
# Torch 2.2.* is the last oficially supported torch version on macOS x86_64
"torch<2.3; sys_platform == 'darwin' and platform_machine == 'x86_64'",
"torch",
]
all = ["srai[osm,voronoi,gtfs,plotting,torch]"]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool]
[tool.pdm]
[tool.pdm.dev-dependencies]
# pdm add -d <library>
dev = ["bumpver", "types-requests"]
# pdm add -dG lint <library>
lint = ["pre-commit", "mypy", "docformatter[tomli]", "ruff"]
# pdm add -dG test <library>
test = [
"pytest>=8.0.0",
"tox-pdm>=0.7.2",
"pytest-mock>=3.3.0",
"requests-mock>=1.12.1",
"pytest-check>=2.3.1",
"pytest-parametrization>=2022.2.1",
"pytest-doctestplus>=1.2.1",
"six>=1.9.0",
"pytest-snapshot>=0.9.0",
]
# pdm add -dG visualization <library>
visualization = [
"matplotlib",
"lonboard",
]
# pdm add -dG docs <library>
docs = [
"mkdocs",
"mkdocs-material",
"mkdocs-mermaid2-plugin",
"mkdocstrings[python]",
"mkdocs-jupyter",
"ipykernel",
"mkdocs-gen-files",
"mkdocs-awesome-pages-plugin",
"mike>=2",
"scikit-learn>=1.2.0",
"umap-learn",
]
# performance = ["scalene"]
license = ["licensecheck==2024.3", "pipdeptree"]
[tool.pdm.scripts]
post_install = "pre-commit install"
[tool.ruff]
line-length = 100
target-version = "py39"
extend-exclude = ["old"]
extend-include = ["*.ipynb"]
[tool.ruff.lint]
select = [
"E",
"W", # pycodestyle
"F", # pyflakes
"UP", # pyupgrade
"D", # pydocstyle
"I", # isort
"B", # flake8-bugbear
"NPY", # NumPy
"YTT", # flake8-2020
"Q", # flake8-quotes
"PLE",
"PLW", # pylint (add "PLR" in the future)
"PIE", # misc lints
"TID", # tidy imports
"ISC", # implicit string concatenation
"TCH", # type-checking imports
# "N", # pep8-naming
# "ANN", # flake8-annotations
]
ignore = ["D212", "ISC001"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pycodestyle]
max-doc-length = 100
[tool.ruff.format]
docstring-code-format = true
[tool.mypy]
strict = true
show_column_numbers = true
disallow_untyped_defs = true
no_implicit_optional = true
check_untyped_defs = true
warn_return_any = true
ignore_missing_imports = true
[tool.docformatter]
syntax = 'google'
black = true
recursive = true
wrap-summaries = 100
wrap-descriptions = 100
# force-wrap = false # uncomment after https://github.com/PyCQA/docformatter/issues/68 is resolved
tab-width = 4
blank = false
pre-summary-newline = true
close-quotes-on-newline = true
wrap-one-line = true
[tool.bumpver]
current_version = "0.8.4"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
commit_message = "chore(CI/CD): bump version {old_version} -> {new_version}"
commit = true
tag = false
push = false
[tool.bumpver.file_patterns]
"pyproject.toml" = [
'^current_version = "{version}"$',
'^version = "{version}"$',
]
"srai/__init__.py" = ['^__version__ = "{version}"$']
"CITATION.cff" = ['^version: {version}$']
[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
log_cli = true
[tool.licensecheck]
using = "requirements"
zero = true
ignore_licenses = ["UNKNOWN"]
ignore_packages = [
'srai', # skip self
'scalene', # uses Apache-2.0 license, takes time to analyse
'docformatter', # uses MIT license, has mismatched license in analysis
'gtfs-kit', # uses MIT license, has mismatched license in analysis
'pymap3d', # uses BSD-2 license, has mismatched license in analysis
'mkdocs-jupyter', # uses Apache-2.0 license, has mismatched license in analysis
'pycountry', # uses LGPLv2, has mismatched license in analysis
'nvidia-cublas-cu11', # uses NVIDIA license
'nvidia-cuda-cupti-cu11', # uses NVIDIA license
'nvidia-cuda-nvrtc-cu11', # uses NVIDIA license
'nvidia-cuda-runtime-cu11', # uses NVIDIA license
'nvidia-cudnn-cu11', # uses NVIDIA license
'nvidia-cufft-cu11', # uses NVIDIA license
'nvidia-curand-cu11', # uses NVIDIA license
'nvidia-cusolver-cu11', # uses NVIDIA license
'nvidia-cusparse-cu11', # uses NVIDIA license
'nvidia-nccl-cu11', # uses NVIDIA license
'nvidia-nvtx-cu11', # uses NVIDIA license
'nvidia-cublas-cu12', # uses NVIDIA license
'nvidia-cuda-cupti-cu12', # uses NVIDIA license
'nvidia-cuda-nvrtc-cu12', # uses NVIDIA license
'nvidia-cuda-runtime-cu12', # uses NVIDIA license
'nvidia-cudnn-cu12', # uses NVIDIA license
'nvidia-cufft-cu12', # uses NVIDIA license
'nvidia-curand-cu12', # uses NVIDIA license
'nvidia-cusolver-cu12', # uses NVIDIA license
'nvidia-cusparse-cu12', # uses NVIDIA license
'nvidia-nccl-cu12', # uses NVIDIA license
'nvidia-nvtx-cu12', # uses NVIDIA license
'nvidia-nvjitlink-cu12', # uses NVIDIA license
'mkl', # Github Action artifact, uses Intel Simplified Software License
]