Skip to content

fix(ci): Windows mmap-release + Ubuntu Qt skip + wiki close-out (#245)#254

Merged
aelefebv merged 1 commit into
dechaofrom
fix-ci-and-wiki-refresh
May 12, 2026
Merged

fix(ci): Windows mmap-release + Ubuntu Qt skip + wiki close-out (#245)#254
aelefebv merged 1 commit into
dechaofrom
fix-ci-and-wiki-refresh

Conversation

@aelefebv

Copy link
Copy Markdown
Owner

Summary

Two CI fixes for PRs #251/#252/#253 (Slices 2/3/4 of #245), bundled with the Phase 5 wiki refresh.

Fix 1 — Windows mmap-release (nellie/im_info/verifier.py): ImInfo.remove_marked_intermediates now drops self.im + gc.collect() before any deletion. Without this, Windows refuses os.remove(im_path) while the tifffile memmap still holds an exclusive lock, manifesting as PermissionError [WinError 32] in test_run_with_csvs_only_preset_drops_all_droppable. Always-release is the cheapest and safest default; mirrors the existing _release_iminfo_memmap test helper pattern.

Fix 2 — Ubuntu Qt importorskip (tests/test_napari_settings.py): module-level pytest.importorskip("qtpy.QtWidgets") so the file skips cleanly on headless Linux CI (which lacks libEGL.so.1). The dataclass-only tests pulled Qt transitively because SettingsConfig lives in the same module as the widget.

Phase 5 wiki refresh: glossary.md (DROPPABLE_KEYS entry), pipeline.md Gotchas (per-output cleanup bullet), im-info.md test-coverage line, now.md (active work cleared, recently-shipped entry for the four-slice close-out + ADR 0014).

Test plan

  • uv run pytest tests/test_run_cleanup.py tests/test_napari_settings.py tests/test_verifier_iminfo.py -q — 90 passed locally
  • uv run pytest -q --ignore=tests/test_*_perf.py — 715 passed, 0 regressions
  • CI on this PR: must pass on Windows + Ubuntu (the two platforms that broke on the slice merges)

🤖 Generated with Claude Code

… Qt importorskip + wiki close-out (#245)

CI fixes for the per-output retention slices (PRs #250-#253):

1. **Windows mmap-release** in
   ``ImInfo.remove_marked_intermediates``. The post-rewrite method
   tried to ``os.remove(im_path)`` while ``self.im`` still held the
   tifffile memmap, triggering ``PermissionError [WinError 32] The
   process cannot access the file because it is being used by
   another process`` on Windows CI. Fix: drop ``self.im`` (and
   ``gc.collect()``) at the start of the method — the existing
   pattern documented at ``_release_iminfo_memmap`` in
   ``test_verifier_iminfo.py``. Always-release is the cheapest
   and safest default; any pipeline intermediate could be
   memmap'd by a stage that's still alive in the process. Callers
   who use ``info.im`` after cleanup get ``None`` (correct — the
   file may be gone).

2. **Ubuntu headless Qt** ImportError on ``libEGL.so.1`` for
   ``test_napari_settings.py``. ``qtpy.QtWidgets`` transitively
   pulls Qt's display libs even for the dataclass-only tests
   (``SettingsConfig`` lives in the same module). Fix: module-level
   ``pytest.importorskip("qtpy.QtWidgets")`` so the entire file
   skips cleanly on systems without Qt's display libs. Tests pass
   normally where Qt loads.

Phase 5 wiki close-out for PRD #245:

- ``wiki/glossary.md`` — new ``DROPPABLE_KEYS`` entry pointing to
  [[decisions/0014-intermediates-policy-frozenset]].
- ``wiki/pipeline.md`` Gotchas — new bullet for the per-output
  cleanup mechanism: end-of-pipeline-only, only-on-success
  (inherits the existing "no try/except around stages" gotcha),
  ``cleanup_drop_keys`` kwarg surface.
- ``wiki/im-info.md`` test-coverage line — updated to call out
  ``remove_marked_intermediates`` + ``DROPPABLE_KEYS`` /
  preset-constants alongside the legacy ``remove_intermediates``
  shim. Test count bumped (~57 → ~68).
- ``wiki/now.md`` — "Active work" cleared; "Recently shipped"
  entry summarizes the four-slice chain, the API surface, the
  failure semantics, the test count delta (715 → 748 non-perf),
  and the new ADR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aelefebv
aelefebv merged commit 6f3bfcb into dechao May 12, 2026
6 checks passed
@aelefebv
aelefebv deleted the fix-ci-and-wiki-refresh branch May 12, 2026 21:21
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