Skip to content

tests/frozen_clock.py fails without the [notebook] extra; checklist for the normalization pin move #262

Closed

Description

@guijacquemet

This was found while reviewing morphobricks-normalization #88 (SWEEP-NM, merged as bbd9b6b).

1. Test hygiene. tests/frozen_clock.py _import_package() imports every module of the package, including notebook_axes and notebook_style. Those raise ImportError when matplotlib or ipywidgets are absent. So without the [notebook] extra, three tests fail:

  • tests/test_description_write.py::test_a_frozen_clock_moved_by_a_day_…
  • the two P30 cases in tests/test_spec_derived_design.py

CI installs the extra, so CI is green, but a plain pip install -e '.[dev]' run fails. There is no date dependence: it was checked across six simulated dates and four time zones. Fix: skip the notebook modules in _import_package() when the extra is missing, or make the dev extra pull in the notebook extra.

2. Checklist for moving the normalization pin to the release that carries #88 (PlaneRecord.position_id required, NM-04):

  1. Tests: pass position_id= wherever a PlaneRecord is built:
    • tests/test_intensity.py, tests/test_report.py, tests/test_unchecked_channels.py, tests/test_notebook_debt.py;
    • tests/test_schema_v2_equivalence.py::test_step_4_…;
    • tests/simulation.py.
  2. run/steps.py:229-231: remove the dead fill-in replace(r, position_id=entries[rel].position_id). A table without IDs is now refused by the reader, and run/reuse.py:130 already turns that into a full rebuild.
  3. tests/test_run.py::test_table_without_position_ids_is_filled_without_reading: rewrite as "refused and rebuilt".
  4. run/rows.py:33: position: str | None becomes str.
  5. README.md:180: add position_id= to the PlaneRecord(...) example.
  6. Bump the pin in pyproject.toml from @v0.3.4 and note it in the CHANGELOG.

With normalization #88 installed, all 28 failures and errors in preprocessing's suite are cases of item 1 or item 3.

Activity

  1. added 2 commits that reference this issue on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions