Skip to content

terraputix/omfilesrspy

Repository files navigation

Omfiles-rs Python bindings

Development

# setup python virtual environment with pyenv
python -m venv .venv
source .venv/bin/activate
# To always activate this environment in this directory run `pyenv local pyo3`
pip install maturin

maturin develop --extras=dev
# if you encounter an error:  Both VIRTUAL_ENV and CONDA_PREFIX are set. Please unset one of them
unset CONDA_PREFIX

Tests

cargo test --no-default-features

Usage

from omfilesrspy import OmFilePyReader

reader = OmFilePyReader("test_file.om")
data = reader[0:2, 0:100, ...]

Benchmarks

Before running the benchmarks, make sure to compile the release version of the library:

maturin develop --release

Then run the benchmarks:

python benchmarks/benchmarks.py

About

Python Bindings for Rust OM reader/writer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published