forked from pnkraemer/probdiffeq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
181 lines (162 loc) · 3.91 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
[build-system]
requires = [
"setuptools>=64",
"setuptools_scm>=8",
]
build-backend = "setuptools.build_meta"
[project]
name = "probdiffeq"
authors = [
{name="Nicholas Krämer", email="[email protected]"}
]
description = "Probabilistic numerical solvers for differential equations"
readme = "README.md"
requires-python=">=3.9"
classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dynamic = ["version"]
[project.optional-dependencies]
cpu = [
"jax[cpu]",
]
test =[
"pytest",
"pytest-xdist",
"pytest-cases",
"pytest-cov",
"diffeqzoo",
"diffrax",
"equinox",
]
lint =[
"pre-commit",
]
format =[
"ruff",
"jupytext",
]
example = [
"jupyter",
"matplotlib",
"jupytext",
"diffeqzoo",
"tueplots",
"tqdm",
"optax",
"blackjax>=1.0.0",
"diffrax",
"numba",
]
doc = [
"mkdocs",
"mkdocs-material",
"mkdocs-exclude",
"mkdocstrings-python",
"mkdocstrings",
"mkdocs-jupyter",
]
[tool.setuptools.packages.find]
# list of folders that contain the packages (["."] by default)
where = ["."]
# package names should match these glob patterns (["*"] by default)
include = ["probdiffeq*"]
[tool.setuptools_scm]
version_file = "probdiffeq/_version.py"
[project.urls]
"Documentation" = "https://pnkraemer.github.io/probdiffeq/"
"Issue tracker" = "https://github.com/pnkraemer/probdiffeq/issues"
[tool.pytest.ini_options]
testpaths = ["tests"]
norecursedirs = ["dist", "build", "dev", "typings"]
addopts = ["--cov=probdiffeq", "--cov-report=html"]
# This is how we measure coverage; it is purely an internal/local thing for now.
# That means that we don't display test coverage, but use it to guide refactoring
# the tests.
[tool.coverage.run]
source = ["probdiffeq/*"]
omit = ["probdiffeq/doc_util/*"]
[tool.coverage.report]
exclude_also = [
# Debugging-only code should not be measured
"def __repr__",
# Interfaces should not be measured
"@abc.abstractmethod",
"raise NotImplementedError",
# Tree flattening/unflattening is not always called but important
# once functions are jitted by the user
"def tree_flatten",
"def tree_unflatten",
]
[tool.ruff]
include = ["**.py", "**/pyproject.toml", "**.ipynb"]
# See: https://beta.ruff.rs/docs/rules/
select = [
# pycodestyle (warning, error)
"W",
"E",
# Pyflakes:
"F",
# pydocstyle:
"D",
# pyupgrade:
"UP",
# flake8-bugbear:
"B",
# flake8-builtins:
"A",
# flake8-import-conventions:
"ICN",
# flake8-pytest-style:
"PT",
# flake8-quotes:
"Q",
# flake8-return:
"RET",
# flake8-simplify:
"SIM",
# flake8-unused-arguments:
"ARG",
# Ruff-specific rules:
"RUF",
# isort:
"I",
# flake8-errormsg:
"EM",
# tryceratops:
"TRY",
]
ignore = [
# warning: `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible.
"D203",
# warning: `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible.
"D213",
# zip(..., strict=True/False) is not supported on Python < 3.10
"B905",
# Magic methods don't need a docstring:
"D105",
]
# Same as Black.
line-length = 88
indent-width = 4
[tool.ruff.format]
# Use `\n` line endings for all files
line-ending = "lf"
# Prefer single quotes over double quotes.
quote-style = "double"
skip-magic-trailing-comma = true
[tool.ruff.isort]
split-on-trailing-comma = false
[tool.ruff.per-file-ignores]
# Auxiliary functions and tests don't need docstring-enforcement:
"probdiffeq/util/*" = ["D102", "D103"]
"probdiffeq/impl/*" = ["D102"]
"probdiffeq/backend/*" = ["D103"]
"tests/*" = ["D103"]
[tool.ruff.pydocstyle]
convention = "numpy"