Part of #108 (health-review epic).
Context
The ctypes Python binding currently exposes only get_version, get_stp, get_stp_table, get_default_table, and get_csda_table. The C library offers considerably more, and a first-class Python wrapper is a stated goal alongside the WASM web app.
Gaps
Not yet wrapped:
Distribution gap
The package is dev-install only (requires a locally built .so via LIBDEDX_SO). There are no published wheels.
Proposed change
- Extend
python/libdedx/_api.py (and the .pyi stubs) to wrap the full API, with numpy-friendly array helpers and Pythonic error handling (raise on *err).
- Build and publish wheels (manylinux/macOS/Windows) bundling the native library, to PyPI, via CI.
Acceptance criteria
References
Depends on / relates to: #112, #111, #79, #6
Part of #108 (health-review epic).
Context
The
ctypesPython binding currently exposes onlyget_version,get_stp,get_stp_table,get_default_table, andget_csda_table. The C library offers considerably more, and a first-class Python wrapper is a stated goal alongside the WASM web app.Gaps
Not yet wrapped:
dedx_get_inverse_stp) and inverse CSDA (dedx_get_inverse_csda).convert_units/ futurededx_convert_units, see refactor: namespace public convert_units() as dedx_convert_units() #112).dedx_get_*_name,dedx_get_*_list, min/max energy), and the planned valid-combination query API (Add query API for valid (program, ion, material) combinations to support GUI/frontend development #79).Distribution gap
The package is dev-install only (requires a locally built
.soviaLIBDEDX_SO). There are no published wheels.Proposed change
python/libdedx/_api.py(and the.pyistubs) to wrap the full API, withnumpy-friendly array helpers and Pythonic error handling (raise on*err).Acceptance criteria
pip install libdedxworks from a published wheel without a manual native build (CI publishes wheels).__init__.pyi) andruff/pytest pass for the expanded surface.References
Depends on / relates to: #112, #111, #79, #6