Skip to content

Re-organized codebase, PyPI wheel#8

Merged
ps-cd merged 20 commits into
mainfrom
pypi
Aug 18, 2025
Merged

Re-organized codebase, PyPI wheel#8
ps-cd merged 20 commits into
mainfrom
pypi

Conversation

@ps-cd

@ps-cd ps-cd commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

Re-organized codebase following pyo3 repo layout

Merged base-streamer repo back into nistreamer

Originally, codebase was split into separate base-streamer and ni-streamer repos with the intent to potentially re-use base-streamer logic in similar streaming packages on other hardware platforms.

However, when split into separate repos, ni-streamer and base-streamer can have different, possibly incompatible versions checked-out. This increases the risk of confusing errors when users are trying to build from source. There is also a room for maintainer overlooks and version scrambling.

With this PR, we are releasing on PyPI, so clear and consistent version management becomes critical. Since extending to other hardware platforms is unlikely, we decided to merge base-streamer back into nistreamer to lock both versions together. base-streamer is left visible for reference. nistreamer-usrlib is still a separate repo to allow for user-managed forks.

Unified naming convention

Changed crate naming convention (following pyo3 example):
nistreamer-macros
nistreamer-base
nistreamer-usrlib
nistreamer

Updated GitHub repos. Also changed GitHub organization name from pulse-streamer to NIStreamer for clarity.

Flattened sub-crate directory layout

Now the head crate nistreamer is the repo root. Secondary crates - nistreamer-macros and nistreamer-base - are sub-directories placed in root.

Maturin mixed Rust-Python project

Now maturin recognizes the project as mixed and handles Py API together with the compiled back-end:

  • maturin develop places compiled _nistreamer into PyAPI directory and installs a link into the active Lib/site-packages so import nistreamer works without adding path;
  • maturin build packs both PyAPI and compiled _nistreamer together into a wheel.

PyPI Wheel

  • Switched to Python ABI mode in pyo3 to allow for a single build to run on multiple Python versions;
  • Prepared pyproject.toml.

Docs

  • Updated Getting Started/Installation;
  • Added Internals/Project Structure section.

ps-cd added 20 commits August 6, 2025 16:30
# Conflicts:
#	nicompiler_backend/.gitignore
#	nicompiler_backend/Cargo.toml
#	nicompiler_backend/src/channel.rs
#	nicompiler_backend/src/device.rs
#	nicompiler_backend/src/experiment.rs
#	nicompiler_backend/src/instruction.rs
#	nicompiler_backend/src/lib.rs
#	nicompiler_backend/src/main.rs
#	nicompiler_backend/src/unittest.rs
…ced in `/py_api/nistreamer/_nistreamer`, updated config files and imports)
@ps-cd ps-cd merged commit a65d4ae into main Aug 18, 2025
1 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant