Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
81 lines (71 loc) · 3.34 KB
/
Copy pathpyproject.toml
File metadata and controls
81 lines (71 loc) · 3.34 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
[project]
name = "b3_secfem"
version = "0.1.0"
description = "Lightweight FEniCSx-based 2D cross-section property solver for composite blade/wing sections."
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
# Note: fenics-dolfinx, petsc4py, mpi4py, fenics-ufl, fenics-basix are not
# distributed as PyPI binary wheels. Install them via the system package
# manager (Ubuntu/Debian: `apt install fenicsx python3-dolfinx`) or
# conda-forge/pixi, then create the project venv with
# `uv venv --system-site-packages` so they remain visible.
dependencies = [
"meshio>=5.3",
# Standalone fenicsx environments need numpy<2 to match the ABI of the
# system (apt) fenics-dolfinx / petsc4py build (numpy 1.26.x): re-pin there
# with `uv pip install 'numpy<2'` (see Makefile). Unpinned here because the
# monorepo workspace needs numpy>=2 (frd2vtu via the CalculiX interface)
# and the dolfinx backend is optional in-workspace.
"numpy",
"pydantic>=2",
"rich",
"b3_mat",
# PyMFEM 4.8+ ships manylinux wheels only (numpy-1/2 agnostic); the sdist
# asserts on Windows. Older versions are sdist-only and need a native MFEM
# toolchain. Core on Linux so every workspace `uv sync` keeps a
# no-system-deps backend installed; fenicsx stays system-provided.
"mfem>=4.8; sys_platform == 'linux'",
"scipy>=1.10", # singular nullspace solves in the mfem chain
]
[project.optional-dependencies]
dev = ["pytest>=8", "ruff", "matplotlib", "pre-commit", "numba>=0.59"]
# Optional fast path for mfem bulk assembly (falls back to numpy bulk / python integrator).
numba = ["numba>=0.59"]
# airfoilmesh is the sibling ``b3_af`` package (not published to PyPI). The
# airfoil-section tests skip when it is absent, so it stays OUT of the extras:
# a hard ``b3_af`` requirement is unsatisfiable in any workspace that does not
# ship b3_af (e.g. non-se b3 clients), breaking their universal `uv sync`.
# Install it directly to exercise those tests: ``pip install -e ../b3_af``
# (see Makefile), or rely on it already being a workspace member upstream.
# mfem is a Linux-only core dep (the wheel-only, no-system-deps backend);
# this extra remains as a no-op alias so ``b3_secfem[mfem]`` installs keep
# working. Same platform marker so the extra cannot request a Windows build.
mfem = ["mfem>=4.8; sys_platform == 'linux'", "scipy>=1.10"]
[project.scripts]
b3_secfem = "b3_secfem.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/b3_secfem"]
# In the b3_master uv workspace, b3_mat resolves via `workspace = true` and
# airfoilmesh is unused. For standalone use, the Makefile's `install` target
# installs both as path-editable sources (../b3_mat, ../b3_af).
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.ruff]
line-length = 88
target-version = "py311"
[tool.ruff.format]
quote-style = "double"
[tool.ruff.lint.per-file-ignores]
# Tests gate dolfinx imports behind pytest.importorskip(), so the heavy
# imports must legitimately come after a module-level statement.
"tests/*" = ["E402"]
# 'I' is the conventional symbol for the second moment of area; keep it.
"src/b3_secfem/_meshlib.py" = ["E402", "E741"]
# 'I'/'J'/'D' are the conventional CSR row-pointer / column / data arrays.
"src/b3_secfem/backends/mfem.py" = ["E741"]