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
|
# 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.
# pip install -r build-requirements.txt
[build-system]
requires = ["scikit-build-core[pyproject]>=0.5", "nanobind>=2.0.0", "mpi4py"]
build-backend = "scikit_build_core.build"
[project]
name = "fenics-dolfinx"
version = "0.9.0"
description = "DOLFINx Python interface"
readme = "../README.md"
requires-python = ">=3.9.0"
license = { file = "COPYING.LESSER" }
authors = [
{ email = "fenics-steering-council@googlegroups.com" },
{ name = "FEniCS Steering Council" },
]
dependencies = [
"numpy>=1.21",
"cffi",
"nanobind",
"mpi4py",
"fenics-basix>=0.9.0,<0.10.0",
"fenics-ffcx>=0.9.0,<0.10.0",
"fenics-ufl>=2024.2.0,<2024.3.0",
]
[project.optional-dependencies]
docs = [
"breathe",
"jupytext",
"markdown",
"matplotlib",
"myst_parser",
"pyyaml",
"sphinx",
"sphinx_rtd_theme",
]
lint = ["ruff>=0.2.0"]
optional = ["numba", "pyamg"]
petsc4py = ["petsc4py"]
test = ["pytest", "scipy", "matplotlib", "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"
[tool.pytest.ini_options]
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 = [
"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 = ["UP007", "RUF012"]
allowed-confusables = ["σ"]
[tool.ruff.lint.isort]
known-first-party = ["basix", "dolfinx", "ffcx", "ufl"]
known-third-party = ["gmsh", "numba", "numpy", "pytest", "pyvista", "pyamg"]
section-order = [
"future",
"standard-library",
"mpi",
"third-party",
"first-party",
"local-folder",
]
[tool.ruff.lint.isort.sections]
"mpi" = ["mpi4py", "petsc4py"]
|