You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #130. Refines the Proposed change of #117.
Context
#117 proposes extending the existing ctypes binding (python/libdedx/_api.py) to cover the full C API and publish wheels. After reviewing the ecosystem, we are recording a binding-technology decision: replace the ctypes binding with a nanobind extension built by scikit-build-core, matching libamtrack/pyamtrack's stack.
Rationale:
One build/CI/packaging idiom shared with pyamtrack (which also uses scikit-build-core + nanobind, cibuildwheel auto64, CPython 3.9–3.14, numpy, setuptools_scm).
Cleanly exposes the workspace/config object model (allocate workspace → load config → evaluate), which is awkward to express well in raw ctypes.
libdedx is self-contained (embedded data, no GSL), so the extension can statically link libdedx → a single-file extension and trivially self-contained wheels (simpler than pyamtrack, which must vendor GSL).
Part of #130. Refines the Proposed change of #117.
Context
#117 proposes extending the existing
ctypesbinding (python/libdedx/_api.py) to cover the full C API and publish wheels. After reviewing the ecosystem, we are recording a binding-technology decision: replace the ctypes binding with a nanobind extension built by scikit-build-core, matchinglibamtrack/pyamtrack's stack.Rationale:
auto64, CPython 3.9–3.14,numpy,setuptools_scm).Proposed change
python/pyproject.toml→build-backend = "scikit_build_core.build"; build-requiresnanobind,scikit-build-core>0.10,setuptools_scm>=8; runtime depnumpy.libdedx._corenanobind module that statically links the libdedx C library; usenb::ndarrayfor zero-copy numpy in/out.dedx_get_stp/ CSDA / inverse STP / inverse CSDA,dedx_convert_units(incl.keV/µm, see refactor: namespace public convert_units() as dedx_convert_units() #112),bragg_used, Make Bragg/stoichiometric fallback transparent (surface bragg_used) and add accuracy tests #111).auto64, CPython 3.9–3.14, skip PyPy, macOS target 11.0; install-and-import smoke test each wheel.setuptools_scmlockstep with the C library; PyPI Trusted Publishing (OIDC) onv*tags with a TestPyPI dry-run first.Open decisions
universal2vs separatex86_64+arm64wheels.aarch64Linux (manylinux) now, or defer to keep early build times down.Acceptance criteria
pip install libdedxfrom a published wheel works with no local C build, on Linux/macOS/Windows × CPython 3.9–3.14.setuptools_scm).References
Refines #117 · depends on/relates to #112, #115, #119, #123, #111, #86/#113.
Filed via Claude Code (model: Claude Opus 4.8) as part of the libdedx → libamtrack integration & Python-packaging plan.