Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
154 lines (138 loc) · 4.61 KB
/
Copy pathpyproject.toml
File metadata and controls
154 lines (138 loc) · 4.61 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
[build-system]
requires = ["hatchling>=1.24"]
build-backend = "hatchling.build"
[project]
name = "pyfieldml"
dynamic = ["version"]
description = "A modern pure-Python implementation of FieldML 0.5 with evaluation engine and biomechanics model zoo."
readme = "README.md"
requires-python = ">=3.10"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE", "LICENSES/*.txt"]
authors = [
{ name = "Francis Chemorion" },
]
keywords = ["fieldml", "finite-element", "computational-physiology", "biomechanics", "physiome"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
]
dependencies = [
"lxml>=5.0",
"numpy>=1.26",
"h5py>=3.10",
"scipy>=1.11",
]
[project.urls]
Homepage = "https://github.com/kchemorion/pyfieldml"
Repository = "https://github.com/kchemorion/pyfieldml"
Issues = "https://github.com/kchemorion/pyfieldml/issues"
[project.optional-dependencies]
viz = [
"pyvista>=0.43",
"ipywidgets>=8",
"trame-jupyter-extension",
"ipycytoscape>=1.3",
]
meshio = ["meshio>=5.3"]
scikit-fem = ["scikit-fem>=10"]
opensim = ["meshio>=5.3"]
all = [
"pyfieldml[viz,meshio,scikit-fem,opensim]",
]
dev = [
"build>=1.2",
"pytest>=8",
"pytest-cov>=5",
"nbmake>=1.5",
"ruff>=0.6",
"mypy>=1.11",
"pre-commit>=3.7",
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.26",
"mkdocs-jupyter>=0.25",
"jupyter>=1",
"pyvista>=0.43",
"meshio>=5.3",
"scikit-fem>=10",
]
jupyterlite = [
"jupyterlite-core>=0.4",
"jupyterlite-pyodide-kernel>=0.4",
]
[project.scripts]
pyfieldml = "pyfieldml.cli.main:main"
[tool.hatch.version]
path = "src/pyfieldml/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/pyfieldml"]
[tool.hatch.build.targets.wheel.force-include]
"src/pyfieldml/library/FieldML_0.5.xsd" = "pyfieldml/library/FieldML_0.5.xsd"
"src/pyfieldml/library/FieldML_Library_0.5.xml" = "pyfieldml/library/FieldML_Library_0.5.xml"
"src/pyfieldml/library/xlink-href.xsd" = "pyfieldml/library/xlink-href.xsd"
"src/pyfieldml/datasets/_bundled/unit_cube.fieldml" = "pyfieldml/datasets/_bundled/unit_cube.fieldml"
"src/pyfieldml/datasets/_bundled/femur.fieldml" = "pyfieldml/datasets/_bundled/femur.fieldml"
"src/pyfieldml/datasets/_bundled/rectus_femoris.fieldml" = "pyfieldml/datasets/_bundled/rectus_femoris.fieldml"
"src/pyfieldml/datasets/_bundled/bunny_stanford.fieldml" = "pyfieldml/datasets/_bundled/bunny_stanford.fieldml"
"src/pyfieldml/datasets/_bundled/femur_bodyparts3d.fieldml" = "pyfieldml/datasets/_bundled/femur_bodyparts3d.fieldml"
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", "F", "W", # pycodestyle + pyflakes
"I", # isort
"UP", # pyupgrade
"B", # bugbear
"SIM", # simplify
"RUF", # ruff-specific
"N", # pep8-naming
"D", # pydocstyle (selective)
]
ignore = [
"D100", "D101", "D102", "D103", "D104", "D105", "D107", # missing docstrings — soft-enforce in later phases
"D203", "D213", # conflicting docstring conventions
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D"]
[tool.mypy]
python_version = "3.10"
strict = true
files = ["src/pyfieldml", "tests"]
plugins = []
[[tool.mypy.overrides]]
module = ["lxml.*", "h5py.*", "scipy.*", "meshio.*", "pyvista.*", "vtk.*", "skfem.*", "ipywidgets.*", "ipycytoscape.*", "traitlets.*"]
ignore_missing_imports = true
# Narrow test modules where numpy boolean-indexing / einsum returns escape as
# ``Any`` through helper wrappers. Fixing at the call-site would require
# touching these test files, which are actively being extended by parallel
# agents; let mypy tolerate ``no-any-return`` here until the extensions land.
[[tool.mypy.overrides]]
module = [
"tests.unit.test_bases_lagrange",
"tests.unit.test_hermite_scaling",
"tests.conformance.test_cpp_reference",
]
warn_return_any = false
[tool.pytest.ini_options]
minversion = "8"
addopts = "-ra --strict-markers --strict-config"
testpaths = ["tests"]
pythonpath = ["src"]
[tool.coverage.run]
source = ["src/pyfieldml"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]