Skip to content

Install pypulseq with blochsim and drop the pulseq extra - #39

Merged
mcencini merged 2 commits into
mainfrom
claude/project-thread-xhxvtx
Oct 12, 2026
Merged

mcencini merged 2 commits into
mainfrom
claude/project-thread-xhxvtx

Conversation

@mcencini

Copy link
Copy Markdown
Contributor

Requested by Matteo · project thread

What this changes

Before: reading a Pulseq file (read_pulseq_description, from_pulseq) needed pip install blochsim[pulseq]. Without that extra, the call raised an ImportError naming the extra.

After: pypulseq is a core dependency and the pulseq extra is removed. The runtime extras are now only cu12 and cu13. The ImportError wrapper, its Raises entries and the pypulseq skip guards in the two reader test modules are removed. The docs, the description lesson's Colab cell and the test, doc and examples extras no longer name blochsim[pulseq].

This is part of the extras audit across the project (linked from the project thread). An extra stays only for GPL code, CUDA builds, MKL or a heavy ML stack. pypulseq is pure Python, and pypulseqpp and pulserver already require it.

How it was checked

pip install -e ".[test]"
python -m pytest -q --no-cov tests/sequence/test_pulseq_reader.py tests/sequence/test_mrd_reader.py
16 passed, 16 warnings in 236.94s
pre-commit run --all-files
(all hooks Passed, ruff format and ruff check included)

Checklist

  • pytest passes on the two modules that touch pypulseq. The full suite runs in CI. No new behaviour, so no new test.
  • pre-commit run --all-files is clean.
  • Public docstrings updated (the Raises: ImportError entries are removed).
  • Comments and docstrings describe the code as it is now.
  • No kernel change.
  • Documentation updated where a caller sees it. The docs build was not run locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CSvVvjFeiWyziAK7m5LaLR


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CSvVvjFeiWyziAK7m5LaLR
@mcencini mcencini self-assigned this Oct 12, 2026
@mcencini
mcencini merged commit b08a733 into main Oct 12, 2026
35 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.

2 participants