Skip to main content

Python bindings for RAYX

Project description

rayx-python

Python bindings for RAYX, the ray tracing engine for synchrotron optics.

Installation

pip install rayx

Note: The package includes a compiled C++ extension and is distributed as a pre-built wheel. Source builds are not supported via pip.

Requirements

For development builds (not needed for the pip install above):

  • uv — package/environment manager used for development builds. Install guide
  • Python — 3.12 is recommended Download
  • HDF5 — required by rayx-core for compilation. Install via your system package manager (e.g. apt install libhdf5-dev on Debian/Ubuntu, brew install hdf5 on macOS). See the HDF5 docs if you need a different install method.
  • NVIDIA GPU driver — only required for CUDA-accelerated builds. Verify with nvidia-smi. Download
  • CUDA Toolkit — only required for CUDA-accelerated builds. Verify with nvcc --version. Download

If the toolkit is installed but nvcc isn't found, its bin directory is missing from PATH:

export PATH=/usr/local/cuda/bin:$PATH

Make it permanent by adding that line to ~/.bashrc (or ~/.zshrc) and reloading.

Development

The package can be built in two ways:

  1. CMake — supports build caching; the result is usable immediately with no install step. See the example notebook.
  2. uv build — builds the package as a wheel, which can then be installed into any Python environment.
git submodule update --init --recursive

# Option 1: build in place with CMake (uv creates/manages the environment)
uv run cmake -S . -B build
uv run cmake --build build -j

# Option 2: editable install via uv
uv pip install -e .

uv run puts the managed environment's Python first on PATH, so CMake's find_package(Python) resolves the right interpreter without pinning it manually.

uv pip install -e . only re-links the Python wrapper files. It does not rebuild the compiled bindings — if you change rayx-core or the nanobind glue in rayxpy, rerun the CMake commands (Option 1) to recompile, or the install will keep serving the stale extension.

A tools/bootstrap.sh helper script is also available, wrapping the steps above with CUDA on/off prompting.

Running tests

Tests require a CMake build:

uv run pytest tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rayx-0.4.8.dev1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

rayx-0.4.8.dev1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

rayx-0.4.8.dev1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

rayx-0.4.8.dev1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file rayx-0.4.8.dev1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rayx-0.4.8.dev1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 35557810828db7159ed9198058de7e743c250761e989cca0e394491578db7266
MD5 153e653f5c9ea88f9c2403fafce23f5a
BLAKE2b-256 b67f2f45bc6f5a455b4696e667e7337a3da46524333478c9dcb3a99e11e95727

See more details on using hashes here.

Provenance

The following attestation bundles were made for rayx-0.4.8.dev1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on hz-b/rayx-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rayx-0.4.8.dev1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rayx-0.4.8.dev1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f5336d68d8ec03eaa672f097f4fb595f7af94ca2724c7559432e8f27e4e1b122
MD5 739e3ec711a7136d6879607a0a30f254
BLAKE2b-256 e48275f22d5e1626ee2682271916db144944f5dab4fda2a23f319350a7927ba4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rayx-0.4.8.dev1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on hz-b/rayx-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rayx-0.4.8.dev1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rayx-0.4.8.dev1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7d26875786fdfa62a3f54dc1bd517c5fa36ac6b7165ca44b4c3514957ac6480a
MD5 caa4b575ebb8591dd39e2c726b213e1e
BLAKE2b-256 b95e5b8fde43795808736fb59ef4d14b30bfead461299e999aab0b259ff10f16

See more details on using hashes here.

Provenance

The following attestation bundles were made for rayx-0.4.8.dev1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on hz-b/rayx-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rayx-0.4.8.dev1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rayx-0.4.8.dev1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 395018d9697756b1987527cb13f107910cb5fdef8b64bd7fa3e3b95358169882
MD5 d7c17cf3bf8e5bdaa8cbddf992271e55
BLAKE2b-256 c734e7f583f256fd61dc1fecb9f6928dd34da3f42b4180a95bb4abc537368c40

See more details on using hashes here.

Provenance

The following attestation bundles were made for rayx-0.4.8.dev1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on hz-b/rayx-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page