-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (153 loc) · 4.01 KB
/
pyproject.toml
File metadata and controls
167 lines (153 loc) · 4.01 KB
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
[build-system]
requires = ["hatch"]
build-backend = "hatchling.build"
[project]
name = "pybop"
version = "26.3"
authors = [
{name = "The PyBOP Team"},
]
maintainers = [
{name = "The PyBOP Team"},
]
description = "Python Battery Optimisation and Parameterisation"
readme = {file = "README.md", content-type = "text/markdown"}
license = "BSD-3-Clause"
license-files = ["LICENSE"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
]
# When updating the Python version ranges, please also bump the Python
# versions in the tests in nightly_dependency_tests.yml as appropriate
requires-python = ">=3.10, <3.15"
dependencies = [
"pybamm>=26.3.0",
"numpy>=1.26",
"scipy>=1.12",
"pints>=0.6.0",
"SALib>=1.5",
]
[project.optional-dependencies]
plot = ["plotly>=6"]
scifem = [
"scikit-fem>=8.1.0" # scikit-fem is a dependency for the multi-dimensional pybamm models
]
bpx = [
"bpx>=0.5, <0.6",
]
ep-bolfi = [
"GPy>=1.13.2; python_version < '3.13'",
"ep-bolfi>=3.0.2; python_version < '3.13'"
]
pyprobe = [
"PyProBE-Data>=2.5.0;python_version >= '3.11' and python_version < '3.13'"
]
all = ["pybop[plot,scifem,bpx,pyprobe,ep-bolfi]"]
[dependency-groups]
docs = [
"pydata-sphinx-theme",
"sphinx>=6",
"sphinx-autobuild",
"sphinx-autoapi",
"sphinx-automodapi",
"sphinx_copybutton",
"sphinx_favicon",
"sphinx_design",
"myst-parser",
]
dev = [
"nox[uv]",
"nbmake",
"pre-commit",
"pytest>=6",
"pytest-cov",
"pytest-mock",
"pytest-xdist",
"ruff",
]
[tool.hatch.build.targets.sdist]
exclude = [
"papers/",
"tests/",
"benchmarks/",
"docs/",
"assets/",
"scripts/",
"multiprocessing_bench.py",
"noxfile.py",
"asv.conf.json",
"conftest.py",
"CONTRIBUTING.md",
]
# the wheel additionally excludes files that are not needed for installation, such
#as the changelog and citation files, and the examples. those are present in the sdist.
[tool.hatch.build.targets.wheel]
exclude = [
"papers/",
"tests/",
"benchmarks/",
"docs/",
"assets/",
"scripts/",
"examples/",
"multiprocessing_bench.py",
"noxfile.py",
"asv.conf.json",
"conftest.py",
"CONTRIBUTING.md",
"CHANGELOG.md",
"CITATION.cff",
]
[project.urls]
Homepage = "https://github.com/pybop-team/PyBOP"
Documentation = "https://pybop-docs.readthedocs.io"
Repository = "https://github.com/pybop-team/PyBOP"
Releases = "https://github.com/pybop-team/PyBOP/releases"
Changelog = "https://github.com/pybop-team/PyBOP/blob/develop/CHANGELOG.md"
[tool.pytest.ini_options]
addopts = "--showlocals -v -n auto"
[tool.ruff]
extend-include = ["*.ipynb"]
extend-exclude = ["__init__.py"]
fix = true
[tool.ruff.lint]
select = [
"A", # flake8-builtins: Check for Python builtins being used as variables or parameters
"B", # flake8-bugbear: Find likely bugs and design problems
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes: Detect various errors by parsing the source file
"I", # isort: Check and enforce import ordering
"ISC", # flake8-implicit-str-concat: Check for implicit string concatenation
"TID", # flake8-tidy-imports: Validate import hygiene
"UP", # pyupgrade: Automatically upgrade syntax for newer versions of Python
"SLF001", # flake8-string-format: Check for private object name access
]
ignore = ["E501","E741"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["SLF001"]
"**.ipynb" = ["E402", "E703"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.coverage.run]
source = ["pybop"]
omit = [
"*/tests/*",
"tests/*",
"*/test_*",
"test_*"
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError"
]