Skip to content

[M4-P5] Jupytext Migration: Chamber_Wall_Loss Part 2 (3 notebooks) #987

@Gorkowski

Description

@Gorkowski

Dependencies:

#986 [M4-P4] ──► #THIS [M4-P5]

Dependencies:


Description

Convert 3 notebooks from the Chamber_Wall_Loss directory to Jupytext paired sync format (.py:percent). This is Phase 5 of the M4 Jupytext Full Migration maintenance plan, completing the wall loss tutorials.

Context

This is part of the M4 maintenance plan to complete Jupytext paired sync migration for all remaining notebooks in docs/Examples/. Continues from M4-P4 which started Chamber_Wall_Loss notebooks.

Value:

  • Enables editing notebooks as plain Python files (better diffs, linting, IDE support)
  • Validates notebook content through linting
  • Completes wall loss tutorial coverage including rectangular geometry and forward simulation

Note: Wall loss API was recently updated - watch for any API changes during execution.

Scope

Estimated Lines of Code: ~50 lines (metadata + formatting changes per .py file)
Complexity: Low

Notebooks to Convert (3):

  • docs/Examples/Chamber_Wall_Loss/Notebooks/Rectangular_Wall_Loss_Strategy.ipynb
  • docs/Examples/Chamber_Wall_Loss/Notebooks/wall_loss_builders_factory.ipynb
  • docs/Examples/Chamber_Wall_Loss/Notebooks/Chamber_Forward_Simulation.ipynb

Files Created:

  • docs/Examples/Chamber_Wall_Loss/Notebooks/Rectangular_Wall_Loss_Strategy.py (~100-200 LOC)
  • docs/Examples/Chamber_Wall_Loss/Notebooks/wall_loss_builders_factory.py (~100-200 LOC)
  • docs/Examples/Chamber_Wall_Loss/Notebooks/Chamber_Forward_Simulation.py (~100-200 LOC)

Acceptance Criteria

Conversion

  • All 3 notebooks converted to .py:percent format using validate_notebook --convert-to-py
  • Each .py file has proper Jupytext header with py:percent format

Linting

  • Run ruff check --fix on all new .py files
  • Run ruff format on all new .py files
  • Final ruff check passes with no errors

Sync Validation

  • Sync .py changes back to .ipynb using validate_notebook --sync
  • Validate sync status with validate_notebook --check-sync (must pass)

Execution

  • All 3 notebooks execute successfully using run_notebook
  • No API deprecation warnings or errors in output
  • Review output for any wall loss API issues (document if found)

Technical Notes

Conversion Workflow

For each notebook:

# 1. Convert to .py:percent format
python3 .opencode/tool/validate_notebook.py docs/Examples/Chamber_Wall_Loss/Notebooks/Rectangular_Wall_Loss_Strategy.ipynb --convert-to-py

# 2. Lint the new .py file
ruff check docs/Examples/Chamber_Wall_Loss/Notebooks/Rectangular_Wall_Loss_Strategy.py --fix
ruff format docs/Examples/Chamber_Wall_Loss/Notebooks/Rectangular_Wall_Loss_Strategy.py

# 3. Sync linted .py back to .ipynb
python3 .opencode/tool/validate_notebook.py docs/Examples/Chamber_Wall_Loss/Notebooks/Rectangular_Wall_Loss_Strategy.ipynb --sync

# 4. Validate sync status
python3 .opencode/tool/validate_notebook.py docs/Examples/Chamber_Wall_Loss/Notebooks/Rectangular_Wall_Loss_Strategy.ipynb --check-sync

# 5. Execute to verify notebook works
python3 .opencode/tool/run_notebook.py docs/Examples/Chamber_Wall_Loss/Notebooks/Rectangular_Wall_Loss_Strategy.ipynb

API Validation

During execution, watch especially for wall loss API changes:

  • Import path changes (deprecation warnings)
  • Function signature changes
  • Builder/Factory pattern changes
  • Rectangular geometry parameter changes

If API issues are found, fix them

References

Maintenance Plan:

  • adw-docs/dev-plans/maintenance/M4-jupytext-full-migration.md - Full migration plan

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentCreated or managed by ADW automationmaintenanceMaintenance work - refactoring, technical debt, testingmodel:defaultUse base/sonnet tier (workflow default)type:completeFull complete workflow (plan → build → test → review → document → ship)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions