forked from zerothi/sisl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
267 lines (217 loc) · 6.08 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
# 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
# First we define the build-system which we will probably alter the most
[build-system]
# TODO update this together with setup.cfg
requires = [
"wheel",
"setuptools>=46.0, <=59.2",
"setuptools_scm[toml]>=6.2",
"Cython>=0.28",
# see https://github.com/scipy/oldest-supported-numpy/
# should fix #310
"oldest-supported-numpy; sys_platform != 'win32'",
# TODO work-arounds for windows installations where -mno-cygwin is passed
"numpy==1.19.5 ; sys_platform == 'win32' and python_version <= '3.9'",
"numpy==1.21.5 ; sys_platform == 'win32' and python_version >= '3.10'",
]
build-backend = "setuptools.build_meta"
# Top most items are probably changed the most
[project]
requires-python = ">=3.7"
dependencies = [
# TODO work-arounds for windows installations
"numpy>=1.19.5 ; sys_platform == 'win32' and python_version <= '3.9'",
"numpy>=1.21.5 ; sys_platform == 'win32' and python_version >= '3.10'",
"numpy>=1.13 ; sys_platform != 'win32'",
"scipy>=1.5.0",
"netCDF4",
"pyparsing>=1.5.7"
]
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"]
authors = [
{name = "Nick Papior", email = "[email protected]"}
]
maintainers = [{name="sisl developers"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Cython",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Utilities"
]
# We purposefully get the version dynamically
dynamic = ["version"]
[project.scripts]
sgeom = "sisl.geometry:sgeom"
sgrid = "sisl.grid:sgrid"
sdata = "sisl.utils._sisl_cmd:sisl_cmd"
stoolbox = "sisl_toolbox.cli:stoolbox_cli"
[project.urls]
Homepage = "https://zerothi.github.io/sisl"
Releases = "https://github.com/zerothi/sisl/releases"
Documentation = "https://zerothi.github.io/sisl"
Repository = "https://github.com/zerothi/sisl"
Source = "https://github.com/zerothi/sisl"
[project.optional-dependencies]
analysis = [
"xarray >= 0.10.0",
"tqdm"
]
viz = [
"dill >= 0.3.2",
"pathos",
"pandas",
"xarray >= 0.10.0",
"scikit-image",
"plotly",
"matplotlib",
"ase",
]
viz-plotly = [
"dill >= 0.3.2",
"pathos",
"pandas",
"xarray >= 0.10.0",
"scikit-image",
"plotly",
]
viz-matplotlib = [
"dill >= 0.3.2",
"pathos",
"pandas",
"xarray >= 0.10.0",
"scikit-image",
"matplotlib",
]
viz-blender = [
"dill >= 0.3.2",
"pathos",
"pandas",
"xarray >= 0.10.0",
"scikit-image",
]
viz-ase = [
"dill >= 0.3.2",
"pathos",
"pandas",
"xarray >= 0.10.0",
"scikit-image",
"ase",
]
test = [
"pytest",
"pytest-cov",
"pytest-env",
"pytest-faulthandler",
"coveralls",
"tqdm",
"dill >= 0.3.2",
"pathos",
"pandas",
"xarray >= 0.10.0",
"scikit-image",
"matplotlib",
"plotly",
"ase"
]
[tool.pytest.ini_options]
testpaths = [
"sisl"
]
markers = [
"slow: mark a test as slow",
]
addopts = "-rXs --durations=20"
[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._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 = py37,py38,py39,py310
isolated_build = True
[testenv]
setenv =
SISL_NUM_PROCS=1
SISL_VIZ_NUM_PROCS=1
deps = -rdocs/requirements.txt
commands = pytest -s -rXs {posargs}
"""
[tool.setuptools_scm]
write_to = "sisl/_version.py"
fallback_version = "0.0.0.dev+$Format:%H$"
# Options for cibuildwheel
[tool.cibuildwheel]
build-verbosity = "3"
test-extras = "test"
# 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_wheel.sh {project}"
[tool.cibuildwheel.macos]
# This is to allow building cross compilation of arm64 in macosx_x86_64
archs = ["x86_64", "universal2", "arm64"]
[tool.cibuildwheel.windows]
# Use delvewheel on windows to gather all dll files.
before-build = "pip install delvewheel"
repair-wheel-command = "delvewheel repair --no-mangle-all --ignore-in-wheel -w {dest_dir} {wheel}"
[tool.isort]
# how should sorting be done
sections = ['FUTURE', 'STDLIB', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER']
src_paths = ["toolbox", "sisl"]
known_first_party = ["sisl_toolbox", "sisl"]
line_length=90
overwrite_in_place = true
extend_skip = ["sisl/__init__.py"]