-
-
Notifications
You must be signed in to change notification settings - Fork 240
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (136 loc) · 3.69 KB
/
pyproject.toml
File metadata and controls
148 lines (136 loc) · 3.69 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
# NOTE: The DOLFINx Python interface must be built without build
# isolation (PEP517) due to its runtime and build time dependency on
# system built petsc4py and mpi4py.
# NOTE: petsc4py is an optional build dependency, therefore we don't
# list it here.
[build-system]
requires = ["scikit-build-core[pyproject]>=0.10", "nanobind>=2.5.0", "mpi4py"]
build-backend = "scikit_build_core.build"
[project]
name = "fenics-dolfinx"
version = "0.11.0.dev0"
description = "DOLFINx Python interface"
readme = "../README.md"
requires-python = ">=3.10.0"
license = { file = "../COPYING.LESSER" }
authors = [
{ email = "fenics-steering-council@googlegroups.com" },
{ name = "FEniCS Steering Council" },
]
dependencies = [
"numpy>=2.2.6",
"cffi",
"mpi4py",
"fenics-basix>=0.11.0.dev0",
"fenics-ffcx>=0.11.0.dev0",
"fenics-ufl>=2025.3.0.dev0",
]
[project.optional-dependencies]
demo = [
"gmsh",
"networkx",
"numba",
"matplotlib",
"scipy",
"pyvista",
]
docs = [
"breathe",
"jupytext",
"markdown",
"myst_parser",
"packaging",
"pyyaml",
"sphinx",
"sphinx_rtd_theme",
"sphinx_codeautolink[ipython]",
"sphinxcontrib-bibtex",
"fenics-dolfinx[demo]",
]
lint = ["ruff>=0.2.0"]
optional = ["numba"]
petsc4py = ["petsc4py"]
test = [
"matplotlib",
"networkx",
"packaging",
"pytest>=9.0.0",
"scipy",
"fenics-dolfinx[optional]",
]
ci = [
"mypy",
"pytest-xdist",
"types-setuptools",
"fenics-dolfinx[build]",
"fenics-dolfinx[docs]",
"fenics-dolfinx[lint]",
"fenics-dolfinx[optional]",
"fenics-dolfinx[test]",
]
[tool.scikit-build]
wheel.packages = ["dolfinx"]
sdist.exclude = ["*.cpp"]
cmake.build-type = "Release"
wheel.license-files = ["../COPYING*"]
[tool.pytest]
junit_family = "xunit2"
markers = [
"skip_in_parallel: marks tests that should be run in serial only.",
"petsc4py: tests that require PETSc/petsc4py (deselect with '-m \"not petsc4py\"').",
"adios2: tests that require Adios2 (deselect with '-m \"not adios2\"').",
"xfail_win32_complex: expected failures for complex numbers in Win32.",
]
[tool.mypy]
# Suggested at https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
# Goal would be to make all of the below True long-term
disallow_untyped_defs = false
disallow_any_unimported = false
no_implicit_optional = false
check_untyped_defs = false
warn_return_any = false
warn_unused_ignores = false
show_error_codes = true
ignore_missing_imports = true
[tool.ruff]
line-length = 100
indent-width = 4
[tool.ruff.lint]
select = [
"D", # pydocstyle
"E", # pycodestyle
"W", # pycodestyle
"F", # pyflakes
"I", # isort - use standalone isort
"RUF", # Ruff-specific rules
"UP", # pyupgrade
"ICN", # flake8-import-conventions
"NPY", # numpy-specific rules
"FLY", # use f-string not static joins
"NPY201", # numpy 2.x ruleset
]
ignore = ["RUF012"]
allowed-confusables = ["σ", "ρ"]
[tool.ruff.lint.isort]
known-first-party = ["basix", "dolfinx", "ffcx", "ufl"]
known-third-party = ["gmsh", "numba", "numpy", "pytest", "pyvista"]
section-order = [
"future",
"standard-library",
"mpi",
"third-party",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
"mpi" = ["mpi4py", "petsc4py"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"demo*.py" = ["D100"] # undocumented-public-module
"test*.py" = [
"D100",
"D103", # undocumented-public-function
"D205" # missing-blank-line-after-summary
]
"conf.py" = ["D100", "D103", "D205"]