fix(ci): Windows mmap-release + Ubuntu Qt skip + wiki close-out (#245)#254
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_intermediatesnow dropsself.im+gc.collect()before any deletion. Without this, Windows refusesos.remove(im_path)while the tifffile memmap still holds an exclusive lock, manifesting asPermissionError [WinError 32]intest_run_with_csvs_only_preset_drops_all_droppable. Always-release is the cheapest and safest default; mirrors the existing_release_iminfo_memmaptest helper pattern.Fix 2 — Ubuntu Qt importorskip (
tests/test_napari_settings.py): module-levelpytest.importorskip("qtpy.QtWidgets")so the file skips cleanly on headless Linux CI (which lackslibEGL.so.1). The dataclass-only tests pulled Qt transitively becauseSettingsConfiglives in the same module as the widget.Phase 5 wiki refresh:
glossary.md(DROPPABLE_KEYSentry),pipeline.mdGotchas (per-output cleanup bullet),im-info.mdtest-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 locallyuv run pytest -q --ignore=tests/test_*_perf.py— 715 passed, 0 regressions🤖 Generated with Claude Code