-
Notifications
You must be signed in to change notification settings - Fork 35
/
pyproject.toml
222 lines (201 loc) · 5.51 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
[build-system]
build-backend = 'mesonpy'
requires = [
"meson-python>=0.15.0",
"Cython>=3.0.8",
"setuptools_scm[toml]>=6.2",
# numpy requirement for wheel builds for distribution on PyPI - building
# against 2.x yields wheels that are also compatible with numpy 1.x at
# runtime.
"numpy>=2.0.0rc1",
]
[project]
name = 'discretize'
dynamic = ["version"]
description = 'Discretization tools for finite volume and inverse problems'
readme = 'README.rst'
requires-python = '>=3.10'
authors = [
{name = 'SimPEG developers', email = 'rowanc1@gmail.com'},
]
keywords = [
'finite volume', 'discretization', 'pde', 'ode'
]
# Note: Python and NumPy upper version bounds should be set correctly in
# release branches, see:
# https://scipy.github.io/devdocs/dev/core-dev/index.html#version-ranges-for-numpy-and-other-dependencies
dependencies = [
# TODO: update to "pin-compatible" once possible, see
# https://github.com/mesonbuild/meson-python/issues/29
"numpy>=1.22.4",
"scipy>=1.8",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Cython",
"Programming Language :: C++",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Physics",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Natural Language :: English",
]
[project.license]
file = 'LICENSE'
[project.optional-dependencies]
plot = ["matplotlib"]
viz = ["vtk>=6", "pyvista"]
omf = ["omf"]
all = ["discretize[plot,viz,omf]"]
doc = [
"sphinx!=4.1.0",
"pydata-sphinx-theme==0.15.4",
"sphinx-gallery==0.1.13",
"numpydoc>=1.5",
"jupyter",
"graphviz",
"pillow",
"pooch",
"discretize[all]",
]
test = [
"pytest",
"pytest-cov",
"sympy",
"discretize[doc,all]",
]
# when changing these, make sure to keep it consistent with .pre-commit-config.
style = [
"black==24.3.0",
"flake8==7.0.0",
"flake8-bugbear==23.12.2",
"flake8-builtins==2.2.0",
"flake8-mutable==1.2.0",
"flake8-rst-docstrings==0.3.0",
"flake8-docstrings==1.7.0",
"flake8-pyproject==1.2.3",
]
build = [
"meson-python>=0.14.0",
"meson",
"ninja",
"numpy>=1.22.4",
"cython>=0.29.35",
"setuptools_scm",
]
[project.urls]
Homepage = 'https://simpeg.xyz'
Documentation = 'https://discretize.simpeg.xyz'
Repository = 'http://github.com/simpeg/discretize.git'
[tool.setuptools_scm]
[tool.cibuildwheel]
# skip building wheels for python 3.6, 3.7, 3.8, 3.9, all pypy versions, and specialty linux
# processors (still does arm builds though).
# skip windows 32bit
skip = "cp36-* cp37-* cp38-* cp39-* pp* *_ppc64le *_i686 *_s390x *-win32"
build-verbosity = "3"
# test importing discretize to make sure externals are loadable.
test-command = 'python -c "import discretize; print(discretize.__version__)"'
# use the visual studio compilers
[tool.cibuildwheel.windows.config-settings]
setup-args = [
'--vsenv'
]
[tool.coverage.run]
branch = true
source = ["discretize", "tests", "examples", "tutorials"]
plugins = [
"Cython.Coverage",
]
[tool.coverage.report]
ignore_errors = false
show_missing = true
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
"AbstractMethodError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
]
[tool.black]
required-version = '24.3.0'
target-version = ['py38', 'py39', 'py310', 'py311']
[tool.flake8]
extend-ignore = [
# Too many leading '#' for block comment
'E266',
# Line too long (82 > 79 characters)
'E501',
# Do not use variables named 'I', 'O', or 'l'
'E741',
# Line break before binary operator (conflicts with black)
'W503',
# Ignore spaces before a colon (Black handles it)
'E203',
# Ignore spaces around an operator (Black handles it)
'E225',
# Ignore rst warnings for start and end, due to *args and **kwargs being invalid rst, but good for numpydoc
'RST210',
'RST213',
# ignore undocced __init__
'D107',
]
exclude = [
'.git',
'.eggs',
'__pycache__',
'.ipynb_checkpoints',
'docs/examples/*',
'docs/tutorials/*',
'docs/*',
'discretize/_extensions/*.py',
'.ci/*'
]
per-file-ignores = [
# disable unused-imports errors on __init__.py
# Automodule used for __init__ scripts' description
'__init__.py: F401, D204, D205, D400',
# do not check for assigned lambdas in tests
# do not check for missing docstrings in tests
'tests/*: E731, D',
'tutorials/*: D',
'examples/*: D',
]
exclude-from-doctest = [
# Only check discretize for docstring style
'tests',
'tutorials',
'examples',
]
rst-roles = [
'class',
'func',
'mod',
'meth',
'attr',
'ref',
'data',
# Python programming language:
'py:func','py:mod','py:attr','py:meth',
]
rst-directives = [
# These are sorted alphabetically - but that does not matter
'autosummary',
'currentmodule',
'deprecated',
]