Skip to content

MAINT: Dependencies, CI (ruff pin, macOS, release tests) and dead code - #64

Merged
Randomidous merged 8 commits into
BeMoBIL:mainfrom
Randomidous:maint/packaging-ci
Oct 20, 2026
Merged

Randomidous merged 8 commits into
BeMoBIL:mainfrom
Randomidous:maint/packaging-ci

Conversation

@Randomidous

Copy link
Copy Markdown
Member

MAINT: Pin ruff, protect Pages deploys, test before releasing, add macOS

  • CI installs the same ruff version as pre-commit (0.17.1), so local
    formatting and the lint job cannot drift apart.
  • The docs workflow only cancels superseded pull request builds; a
    running deploy from main is no longer cancelled by the next push.
  • The release workflow runs the test suite before building and
    publishing.
  • Tests also run on macOS, which the classifiers list as supported.

MAINT: Declare the dependencies pybemobil actually uses

  • scipy and Pillow are imported directly but were only installed
    through other packages; they are now listed.
  • pandas was required but only used together with seaborn, which was in
    no extra, so that report code was never tested. seaborn (which brings
    pandas) is now the optional "report" extra and part of "test".
  • mne-denoise gets a floor of 0.0.2, the first version with ZapLine's
    n_select and the reworked adaptive mode; the minimum-versions CI job
    tests it.
  • nibabel, pybv and scikit-learn are commented as used through MNE.
  • The sdist now includes the tests and docs.

MAINT: Remove dead code and keep private names out of preproc.all

  • viz.utils.clear_matplotlib_memory and make_report.DIPOLE_PLOT_N_JOBS
    were never used.
  • The report's private _glue_imgs duplicated viz.glue_imgs; the report
    now uses glue_imgs, which pads narrower images with white as the
    report version did.
  • preproc no longer exports the private _annotate_break_iter and
    _handle_trans.
  • The report's parallel-jobs variable is now PYBEMOBIL_REPORT_N_JOBS;
    BPN_REPORT_N_JOBS still works.

FIX: Encode numpy integers and bools in NumpyEncoder

Only arrays and np.float32 were handled, so json.dump raised a TypeError
for np.int64, np.bool_ and other numpy scalars (np.float64 worked only
because it subclasses float). All numpy scalars are now converted with
.item().

FIX: Allow the 3-D co-registration plot in reports on macOS

The display check looked for DISPLAY on every non-Windows system, which
macOS does not set, so the plot was always skipped there. macOS is now
treated like Windows, and on Linux a Wayland session (WAYLAND_DISPLAY)
counts as a display too.

Randomidous and others added 8 commits October 20, 2026 17:39
- CI installs the same ruff version as pre-commit (0.17.1), so local
  formatting and the lint job cannot drift apart.
- The docs workflow only cancels superseded pull request builds; a
  running deploy from main is no longer cancelled by the next push.
- The release workflow runs the test suite before building and
  publishing.
- Tests also run on macOS, which the classifiers list as supported.
- scipy and Pillow are imported directly but were only installed
  through other packages; they are now listed.
- pandas was required but only used together with seaborn, which was in
  no extra, so that report code was never tested. seaborn (which brings
  pandas) is now the optional "report" extra and part of "test".
- mne-denoise gets a floor of 0.0.2, the first version with ZapLine's
  n_select and the reworked adaptive mode; the minimum-versions CI job
  tests it.
- nibabel, pybv and scikit-learn are commented as used through MNE.
- The sdist now includes the tests and docs.
- viz.utils.clear_matplotlib_memory and make_report.DIPOLE_PLOT_N_JOBS
  were never used.
- The report's private _glue_imgs duplicated viz.glue_imgs; the report
  now uses glue_imgs, which pads narrower images with white as the
  report version did.
- preproc no longer exports the private _annotate_break_iter and
  _handle_trans.
- The report's parallel-jobs variable is now PYBEMOBIL_REPORT_N_JOBS;
  BPN_REPORT_N_JOBS still works.
Only arrays and np.float32 were handled, so json.dump raised a TypeError
for np.int64, np.bool_ and other numpy scalars (np.float64 worked only
because it subclasses float). All numpy scalars are now converted with
.item().
The display check looked for DISPLAY on every non-Windows system, which
macOS does not set, so the plot was always skipped there. macOS is now
treated like Windows, and on Linux a Wayland session (WAYLAND_DISPLAY)
counts as a display too.
mne-denoise 0.0.2 requires Python 3.12 or newer, so the minimum-versions
job (Python 3.11) could not install it. 0.0.3 has the same ZapLine API
and supports Python 3.11; it is now the floor and the pinned minimum.
@Randomidous
Randomidous merged commit 8be5931 into BeMoBIL:main Oct 20, 2026
9 checks passed
@Randomidous
Randomidous deleted the maint/packaging-ci branch October 20, 2026 16:54
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