-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
205 lines (179 loc) · 5.77 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
################################################################################
# PEP 621 Project Metadata #
################################################################################
# see https://peps.python.org/pep-0621/
[project]
name = "linpde-gp"
description = "Linear PDE Solvers as Gaussian Process Inference"
readme = "README.md"
requires-python = ">=3.10,<3.12"
license = { text = "MIT" }
keywords = [
"partial-differential-equations",
"gaussian-processes",
"probabilistic-numerics",
"galerkin-method",
"finite-element-method",
"collocation-method",
"spectral-methods",
]
authors = [
{ name = "Marvin Pförtner", email = "[email protected]" }
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"numpy>=1.21.3",
"scipy>=1.4",
"probnum~=0.1.25.dev",
"jax[cpu]>=0.2.18",
"pykeops>=2.1.1,<3.0",
]
dynamic = [
"version",
]
[project.optional-dependencies]
plotting = [
"matplotlib>=3.4.3",
]
[project.urls]
github = "https://github.com/marvinpfoertner/linpde-gp"
################################################################################
# PEP 518 Build System Configuration #
################################################################################
# see https://peps.python.org/pep-0518/
[build-system]
requires = [
"setuptools>=61",
"wheel",
"setuptools_scm[toml]>=6.0",
]
build-backend = "setuptools.build_meta"
# see https://setuptools.pypa.io/en/stable/userguide/pyproject_config.html#setuptools-specific-configuration
[tool.setuptools]
platforms = ["any"]
zip-safe = false
packages = ["linpde_gp"]
package-dir = { "" = "src" }
include-package-data = true
[tool.setuptools.dynamic]
version = { attr = "linpde_gp._version.version" }
[tool.setuptools_scm]
local_scheme = "dirty-tag"
write_to = "src/linpde_gp/_version.py"
write_to_template = """
# pylint: skip-file
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = \"{version}\"
"""
################################################################################
# Testing Configuration #
################################################################################
# see https://docs.pytest.org/en/stable/reference/customize.html
# see https://docs.pytest.org/en/stable/reference/reference.html#ini-options-ref
[tool.pytest.ini_options]
addopts = [
"--verbose",
"--doctest-modules",
"--ignore=src/linpde_gp/utils/plotting.py"
]
norecursedirs = [
".*",
"*.egg*",
"dist",
"build",
".tox",
"probnum",
]
testpaths=[
"src",
"tests",
]
doctest_optionflags = "NUMBER NORMALIZE_WHITESPACE"
filterwarnings = [
# "import jax" implies "import flatbuffers", which raises the following warning.
# Ignore similar to https://github.com/google/jax/blob/main/pytest.ini
"ignore:the imp module is deprecated in favour of importlib.*:DeprecationWarning:flatbuffers.*"
]
################################################################################
# Linting Configuration #
################################################################################
[tool.pylint.master]
extension-pkg-whitelist = [
"numpy",
]
load-plugins = [
"pylint.extensions.check_elif",
"pylint.extensions.docparams",
"pylint.extensions.docstyle",
"pylint.extensions.overlapping_exceptions",
"pylint.extensions.mccabe",
]
[tool.pylint.messages_control]
disable = [
# We allow TODO comments in the following format: `# TODO (#[ISSUE NUMBER]): This needs to be done.`
"fixme",
# We want to use "mathematical notation" to name some of our variables, e.g. `A` for matrices
"invalid-name",
# Temporary ignore, see https://github.com/probabilistic-numerics/probnum/discussions/470#discussioncomment-1998097 for an explanation
"missing-return-doc",
"missing-yield-doc",
# This is research code...
"missing-class-docstring",
"missing-module-docstring",
"missing-function-docstring",
]
[tool.pylint.format]
max-line-length = "88"
[tool.pylint.imports]
known-third-party = [
"probnum",
]
[tool.pylint.design]
max-args = 10
max-complexity = 14
max-locals = 20
max-attributes = 15
min-public-methods = 0
[tool.pylint.similarities]
ignore-imports = "yes"
################################################################################
# Formatting Configuration #
################################################################################
# see https://black.readthedocs.io/en/stable/usage_and_configuration/index.html
[tool.black]
include = '\.pyi?$'
# If `exclude` is not set, `black` excludes all files listed in `.gitignore`.
# The following option extends this list of ignored files.
# see https://black.readthedocs.io/en/stable/usage_and_configuration/file_collection_and_discovery.html#gitignore
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories in the root
# of the project.
/(
\.git
| \.hg
)/
'''
# see https://pycqa.github.io/isort/docs/configuration/config_files.html
# see https://pycqa.github.io/isort/docs/configuration/options.html
[tool.isort]
# see https://pycqa.github.io/isort/docs/configuration/profiles.html#black
profile = "black"
combine_as_imports = true
force_sort_within_sections = true
known_third_party = ["probnum"]
known_testing = ["pytest", "pytest_cases"]
sections = [
"FUTURE",
"STDLIB",
"THIRDPARTY",
"TESTING",
"FIRSTPARTY",
"LOCALFOLDER",
]