-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpyproject.toml
248 lines (227 loc) · 5.72 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
[project]
name = "cityseer"
version = '4.15.2'
description = "Computational tools for network-based pedestrian-scale urban analysis"
readme = "README.md"
requires-python = ">=3.10, <3.13"
license = { text = "AGPL-3.0" }
keywords = [
"network-topology",
"numpy",
"architecture",
"openstreetmap",
"urban-planning",
"python3",
"networkx",
"networks",
"spatial-analysis",
"geographical-information-system",
"spatial-data",
"morphometrics",
"network-analysis",
"momepy",
"spatial-data-analysis",
"centrality",
"shapely",
"landuse",
"osmnx",
"network-centralities",
]
authors = [{ name = "Gareth Simons", email = "info@benchmarkurbanism.com" }]
maintainers = [{ name = "Gareth Simons", email = "info@benchmarkurbanism.com" }]
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Rust",
]
dependencies = [
"matplotlib>=3.5.1",
"networkx>=2.8.8",
"pyproj>=3.3.0",
"requests>=2.27.1",
"scikit-learn>=1.0.2",
"tqdm>=4.63.1",
"shapely>=2.0.2",
"numpy>=1.23.3",
"geopandas>=0.12.2",
"rasterio>=1.3.9",
"pyarrow>=16.0.0",
"fiona>=1.9.6",
]
[project.urls]
homepage = "https://cityseer.benchmarkurbanism.com/"
documentation = "https://cityseer.benchmarkurbanism.com/"
repository = "https://github.com/benchmark-urbanism/cityseer-api"
[tool.maturin]
python-source = "pysrc"
module-name='cityseer.rustalgos'
features = ["pyo3/extension-module"]
# [[tool.pdm.source]]
# url = "https://test.pypi.org/simple"
# name = "test"
# verify_ssl = true
[tool.pdm]
allow-prereleases = false
python = "3.12"
[tool.ruff.lint]
select = ["NPY201"]
[tool.pdm.scripts]
docstyle = "pydocstyle --config=pyproject.toml"
generate_docs = "python docs/generate_docs.py"
docs_dev = { shell = "pdm run docstyle && pdm run generate_docs && npm run dev --prefix docs" }
docs_build = { shell = "pdm run docstyle && pdm run generate_docs && npm run build --prefix docs" }
docs_preview = { shell = "pdm run docstyle && pdm run generate_docs && npm run preview --prefix docs" }
formatting = { shell = "black --config=pyproject.toml ./ && isort --settings-file=pyproject.toml ./" }
typechecks = "pyright ."
linting = "pylint --rcfile=pyproject.toml ./pysrc/cityseer"
tests = "pytest ./tests"
# coverage can't trace jitted files
coverage_run = "coverage run pytest"
coverage_report = { shell = "coverage report --show-missing --skip-empty && coverage lcov" }
verify_project = { shell = "pdm run formatting && pdm run linting && pdm run typechecks && pdm run tests" }
[tool.pdm.dev-dependencies]
dev = [
"pytest>=7.2.0",
"osmnx>=1.3.0",
"momepy>=0.5.4",
"pylint>=2.15.9",
"isort>=5.11.4",
"pydocstyle>=6.1.1",
"jupyter-black>=0.3.3",
"coverage>=7.0.1",
"pandas-stubs>=1.5.2.221213",
"types-requests>=2.28.11.7",
"jupyterlab>=3.5.2",
"jupyter>=1.0.0",
"pyright>=1.1.286",
"yapper>=0.4.0",
"black>=22.12.0",
"maturin>=1.1.0",
"pip>=23.2",
"snakeviz>=2.2.0",
"pdoc>=14.1.0",
"docstring-parser>=0.15",
"dominate>=2.8.0",
"utm>=0.7.0",
"ruff>=0.5.1",
]
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[tool.setuptools]
packages = ["cityseer"]
[tool.black]
line-length = 120
color = true
[tool.pylint.master]
disable = [
"too-many-branches",
"too-many-statements",
"too-many-locals",
"too-many-nested-blocks",
"too-many-arguments",
"too-many-instance-attributes",
"too-many-lines",
"too-few-public-methods",
"missing-module-docstring",
"no-name-in-module",
"pointless-string-statement",
"logging-fstring-interpolation",
"R0801",
]
extension-pkg-allow-list=['cityseer.rustalgos']
jobs = 0
output-format = "colorized"
[tool.pylint.basic]
good-names = [
"a",
"b",
"c",
"d",
"e",
"f",
"i",
"j",
"m",
"n",
"q",
"x",
"y",
"ax",
"js",
"mu",
"qs",
"xs",
"ys",
"wt",
]
[tool.pylint.design]
max-args = 10
[tool.pylint.format]
max-line-length = 120
[tool.pyright]
pythonVersion = "3.9"
include = ["pysrc/cityseer"]
exclude = [
"**/node_modules",
"**/__pycache__",
"**/__pypackages__",
"build",
"demos",
"docs",
"**/temp/",
"tests/",
"dist",
".venv",
]
typeCheckingMode = "strict"
stubPath = "pysrc/cityseer/stubs"
useLibraryCodeForTypes = true
reportUntypedFunctionDecorator = false
reportUntypedClassDecorator = false
reportUnknownMemberType = false
reportMissingTypeStubs = false
reportUnnecessaryIsInstance = false
[tool.pydocstyle]
# http://www.pydocstyle.org/en/stable/error_codes.html
ignore = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D200", # One-line docstring should fit on one line with quotes
"D203", # 1 blank line required before class docstring
"D401", # First line should be in imperative mood.
"D403", # First word of the first line should be properly capitalized
"D212", # Multi-line docstring summary should start at the first line
]
match = "(?!test_).*\\.py"
match_dir = "^(?!(__pypackages__|temp|.venv|build|demos|docs|tests)).*"
[tool.isort]
profile = "black"
skip_gitignore = true
line_length = 120
known_first_party = ["cityseer"]
atomic = true
filter_files = true
src_paths = ["pysrc/cityseer", "demos", "tests", "docs"]
[tool.pytest.ini_options]
console_output_style = "count"
log_cli = true
log_cli_level = "INFO"
testpaths = ["tests"]
addopts = "--ignore=tests/test_performance.py --ignore=temp/"
[tool.coverage.run]
source = ["pysrc/cityseer"]
branch = true
omit = [
"**/__init__.py",
"pysrc/cityseer/config.py",
"pysrc/cityseer/tools/plot.py",
]
[tool.coverage.report]
include = ["cityseer/**"]
omit = [
"**/__init__.py",
"pysrc/cityseer/config.py",
"pysrc/cityseer/tools/plot.py",
]