Thank you for your interest in contributing. Bug fixes, new features and documentation improvements are all welcome.
Use the Issues section of this repository. For a bug,
the things that actually help are: your ParaVision version, the pvraw version, the scan and
reco ids involved, and the output of pvraw info on the study.
A problem in parsing a parameter file, assembling an array, or in the voxel-to-patient
affine belongs upstream in brukerapi,
which does all Bruker file reading for pvraw
(ADR 0002); this project owns
how the subject was framed, the NIfTI headers, and BIDS.
If your contribution targets upstream BrkRaw's 0.5+ architecture, direct it there instead — pvraw is developed independently and does not merge upstream changes.
- Code changes — document them, particularly anything driven by a ParaVision compatibility problem.
- New features — include tests in
tests/, following the existing numbered-by-layer naming.
Before opening a pull request, run:
uv run ruff check . # must be clean
uv run pytest -m "not data" # offline suiteAnything that could move geometry or change sidecars also needs a
tools/sweep_nifti.py --compare run against a corpus. Geometry is verified against
data, not against recorded output. The README's Development section is the reference
for the full test suite, the sample-data cache and the sweep tools.
Releases are published to PyPI by CI (.github/workflows/release.yml) when a version
tag is pushed:
-
Set
__version__inpvraw/__init__.pyand add the## <X.Y.Z> — <date>section toCHANGELOG.md, in one commit. (uv.lockdoes not record the project's own version, so no re-lock is needed for a version bump alone.) -
Tag the merged commit on
mainand push the tag:git tag v<X.Y.Z> git push origin v<X.Y.Z>
The tag must match
__version__— the workflow fails when they differ. -
CI builds the sdist and wheel and publishes them with PyPI trusted publishing; there is no API token to manage.
-
CI then creates the GitHub release, with the changelog section for that version as the notes and the sdist and wheel attached. It runs only after PyPI accepted the upload, and fails when
CHANGELOG.mdhas no section for the version — so write the changelog entry in step 1 rather than after the tag.
One-time setup, before the first release: on pypi.org, under Your account →
Publishing, add a pending publisher with project name pvraw, owner CoBrALab,
repository pvraw, workflow release.yml, environment pypi. The first tag push then
creates the PyPI project. The pypi GitHub environment is created automatically on
first use; optionally add a required reviewer to it for a manual approval gate.
Check the open issues to see whether your question has already been answered or the feature already discussed. If you are unsure about a change, open an issue first.