Skip to content

Rename ImageTool provenance API module#380

Draft
kmnhan wants to merge 1 commit into
mainfrom
codex/rename-provenance-api
Draft

Rename ImageTool provenance API module#380
kmnhan wants to merge 1 commit into
mainfrom
codex/rename-provenance-api

Conversation

@kmnhan
Copy link
Copy Markdown
Owner

@kmnhan kmnhan commented May 31, 2026

Summary

Rename the ImageTool provenance API to erlab.interactive.imagetool.provenance and make it the single public import path for framework helpers and concrete operations.

Details

  • Rename provenance_framework.py to private _provenance_framework.py.
  • Rename provenance_operations.py to public provenance.py.
  • Re-export provenance builders, parsers, model types, and concrete operation classes from provenance.
  • Update ImageTool, manager, replay, docs, and tests to import the full provenance module without prov or ops shorthand aliases.
  • Add fresh-process coverage for importing only erlab.interactive.imagetool.provenance and parsing operation-backed serialized specs.
  • Assert saved ImageTool filter state stores serialized state["filter_operation"] and restores through the standalone ImageTool path.

Validation

  • uv run pytest tests/interactive/imagetool/test_provenance.py tests/interactive/imagetool/test_replay_graph.py
  • uv run pytest tests/interactive/imagetool/test_imagetool.py -k "filter_operation or filter_state or saved_filtered_file_data or itool_save_preserves_filter"
  • uv run pytest tests/interactive/imagetool/manager/test_provenance.py
  • uv run pytest tests/interactive/imagetool/manager/test_console.py::test_tool_namespace_set_filtered_data_item_updates_child_provenance tests/interactive/imagetool/manager/test_console.py::test_manager_console_bare_expression_opens_provenance_root tests/interactive/imagetool/manager/test_console.py::test_manager_reload_script_inputs_reuses_shared_recorded_file_prefix tests/interactive/imagetool/manager/test_console.py::test_manager_console_replacement_updates_provenance_and_descendants
  • uv run pytest tests/interactive/test_derivative.py tests/interactive/test_kspace.py tests/interactive/test_fermiedge.py tests/interactive/test_utils.py -k provenance
  • uv run ruff check .
  • uv run ruff format --check .
  • uv run mypy src
  • uv run python -m scripts.ci_test_groups --check-partition

@codecov
Copy link
Copy Markdown

codecov Bot commented May 31, 2026

Codecov Report

❌ Patch coverage is 98.01325% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.09%. Comparing base (a5814f4) to head (3359ea5).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/erlab/interactive/imagetool/_replay_graph.py 94.44% 0 Missing and 1 partial ⚠️
src/erlab/interactive/imagetool/dialogs.py 97.36% 1 Missing ⚠️
...rc/erlab/interactive/imagetool/manager/_wrapper.py 94.11% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #380   +/-   ##
=======================================
  Coverage   89.09%   89.09%           
=======================================
  Files         145      145           
  Lines       47811    47813    +2     
  Branches     7624     7624           
=======================================
+ Hits        42595    42597    +2     
  Misses       3232     3232           
  Partials     1984     1984           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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