-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
pyproject.toml
364 lines (300 loc) · 7.92 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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# Regarding pyproject.toml see
# - PEP 517 project metadata https://www.python.org/dev/peps/pep-0517
# - PEP 518 project metadata https://www.python.org/dev/peps/pep-0518
# - PEP 621 project metadata https://www.python.org/dev/peps/pep-0621
[tool.setuptools_scm]
write_to = "src/sisl/_version.py"
version_file = "src/sisl/_version.py"
fallback_version = "0.15.1"
# First we define the build-system which we will probably alter the most
[build-system]
requires = [
"setuptools_scm[toml]>=6.2",
"scikit-build-core[pyproject]>=0.8",
"Cython>=3",
"numpy>=2.0.0rc1"
]
build-backend = "scikit_build_core.build"
# Top most items are probably changed the most
[project]
requires-python = ">=3.9"
name = "sisl"
description = "Manipulation and post-processing of DFT output and creating tight-binding models for NEGF transport"
readme = "README.md"
license = {text = "MPL-2.0"}
keywords = [
"tight-binding",
"DFT",
"LCAO",
"NEGF",
"physics"
]
# Our dependencies should pretty much follow EOL python releases
# However, the exception is currently that numpy.typing.NDArray
# is currently (as of August 2024) required in some dependency
# packages (PIL).
# So this time around we will be taking a bit more recent one.
# Otherwise, the chosen versions should be something like:
# See when the currently oldest LIVE Python version was first released.
# E.g. 3.9 was released 2020-10-05.
# Now all dependencies that were released around the same time should be the
# lower bound of dependencies.
dependencies = [
# We need npt.NDArray
"numpy>=1.21",
"scipy>=1.6",
# I can't get it to work on py311 with older versions
"pyparsing>=2.2.1",
# xarray fixes get_loc in 0.21
"xarray>=0.21",
]
authors = [
{name = "Nick Papior", email = "nickpapior@gmail.com"},
{name = "Pol Febrer"}
]
maintainers = [{name="sisl developers"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Programming Language :: C",
"Programming Language :: Fortran",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Operating System :: OS Independent",
]
# We purposefully get the version dynamically
dynamic = ["version"]
[tool.scikit-build]
# Consider adding
# minimum-version to choose the fallback mechanism in scikit-build-core
wheel.packages = ["src/sisl", "src/sisl_toolbox"]
# required for dynamic metadata
experimental = true
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
# define a consistent build directory
build-dir = "build/{wheel_tag}"
# cmake and ninja stuff
cmake.verbose = true
cmake.version = ">=3.20"
# source configuration
sdist.reproducible = true
sdist.include = ["src/sisl/_version.py", "*/CMakeLists.txt"]
wheel.expand-macos-universal-tags = true
[project.scripts]
sgeom = "sisl._core.geometry:sgeom"
sgrid = "sisl._core.grid:sgrid"
sdata = "sisl.utils._sisl_cmd:sisl_cmd"
stoolbox = "sisl_toolbox.cli:stoolbox_cli"
[project.urls]
# See here for which are allowed:
# https://github.com/pypi/warehouse/blob/main/warehouse/templates/packaging/detail.html
Homepage = "https://zerothi.github.io/sisl"
Releases = "https://github.com/zerothi/sisl/releases"
Documentation = "https://zerothi.github.io/sisl"
Source = "https://github.com/zerothi/sisl"
Tracker = "https://github.com/zerothi/sisl/issues"
Discussions = "https://github.com/zerothi/sisl/discussions"
Changelog = "https://zerothi.github.io/sisl/changelog/index.html"
Chat = "https://discord.gg/5XnFXFdkv2"
[project.optional-dependencies]
analysis = [
"netCDF4",
"tqdm>=4.36.0",
]
viz = [
"nodify",
"netCDF4",
"dill >= 0.3.2",
"pathos",
"scikit-image",
"plotly",
"matplotlib",
"ase",
]
viz-plotly = [
"nodify",
"netCDF4",
"dill >= 0.3.2",
"pathos",
"scikit-image",
"plotly",
]
viz-matplotlib = [
"nodify",
"netCDF4",
"dill >= 0.3.2",
"pathos",
"scikit-image",
"matplotlib",
]
viz-blender = [
"nodify",
"netCDF4",
"dill >= 0.3.2",
"pathos",
"scikit-image",
]
viz-ase = [
"netCDF4",
"dill >= 0.3.2",
"pathos",
"scikit-image",
"ase",
]
test = [
"pytest>=7",
"coverage[toml]",
"pytest-cov",
"pytest-env",
"pytest-faulthandler",
]
docs = [
"nbsphinx",
"sphinx-rtd-theme",
"sphinx-design",
"sphinx-gallery",
"sphinx-copybutton",
"sphinx-togglebutton",
"sphinx-inline-tabs",
"sphinxcontrib-bibtex",
"importlib-metadata",
"ipykernel",
"ipywidgets",
"jupyterlab-widgets",
"kaleido",
"pytz",
# Visualizing nodes
"networkx",
"pyvis",
"pybtex",
"pandoc",
]
[tool.pytest.ini_options]
testpaths = [
"src"
]
markers = [
"slow: mark a test as slow",
]
addopts = "-rXs --durations=20"
[tool.coverage.run]
source_pkgs = [
"sisl",
"sisl_toolbox",
]
omit = [
"*/conftest.py",
]
[tool.coverage.report]
include_namespace_packages = true
exclude_also = [
"raise NotImplementedError",
]
exclude_lines = [
"@overload",
'if __name__ == "__main":',
"if TYPE_CHECKING:",
]
[tool.pylint]
[tool.pylint.master]
jobs = 6
ignore-paths = [
".*/tests/.*.py"
]
ignore-patterns = [
"conftest.py",
# This is autogenerated, but may be present
"_version.py"
]
# Do not create false-positives for Cython extensions
extension-pkg-allow-list = [
"sisl._math_small",
"sisl._indices",
"sisl._core._lattice",
"sisl.io.siesta._siesta",
"sisl.physics._bloch",
"sisl.physics._matrix_k",
"sisl.physics._matrix_dk",
"sisl.physics._matrix_ddk",
# external packages required
"numpy",
"scipy"
]
[tool.pylint.format]
# Currently no formatting rules
[tool.pylint.messages_control]
max-line-length = 110
disable = [
"invalid-name",
"missing-module-docstring",
"redefined-builtin"
]
[tool.tox]
legacy_tox_ini = """
[tox]
minversion = 3.3.0
envlist = py39,py310,py311,py312
isolated_build = True
[testenv]
setenv =
SISL_NUM_PROCS=1
SISL_VIZ_NUM_PROCS=1
deps = -rdocs/requirements.txt
commands = pytest -s -rXs {posargs}
"""
[tool.isort]
# how should sorting be done
profile = "black"
sections = ['FUTURE', 'STDLIB', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER']
known_first_party = ["sisl_toolbox", "sisl"]
line_length = 88
overwrite_in_place = true
extend_skip = ["src/sisl/__init__.py", "src/sisl/_version.py"]
extend_skip_glob = ["files/*", "*/.*"]
multi_line_output = "VERTICAL_HANGING_INDENT"
[tool.black]
line-length = 88
target-version = ["py39", "py310", "py311", "py312"]
extend-exclude = """
(
^/files/*
| /\\..*
| .*/\\..*
)
"""
[tool.cibuildwheel]
build-verbosity = 3
archs = ["auto"]
test-requires = ["pytest", "joblib"]
test-extras = "test"
skip = [
"pp*",
"*musllinux*",
]
test-skip = ""
# Instead of running pytest directly, we use a bash script that will set up
# the appropiate value for the SISL_FILES_TEST variable, a path pointing to
# the sisl-files directory, which contains files for testing.
test-command = "bash {project}/tools/build_tools/test_wheels.sh"
[tool.cibuildwheel.linux]
[[tool.cibuildwheel.overrides]]
# basically adding to test-requires for windows
select = "*win*"
inherit.test-requires = "prepend"
test-requires = "delvewheel"
[tool.cibuildwheel.windows]
[tool.cibuildwheel.macos]