Skip to content

ENH: Rename exps_comm_* commission cells to commissions_*#102

Merged
fumitoh merged 1 commit intomainfrom
claude/eager-shannon-abe08b
May 9, 2026
Merged

ENH: Rename exps_comm_* commission cells to commissions_*#102
fumitoh merged 1 commit intomainfrom
claude/eager-shannon-abe08b

Conversation

@fumitoh
Copy link
Copy Markdown
Member

@fumitoh fumitoh commented May 9, 2026

Summary

  • Continues the 3f738b3 cell-naming standardization in TradLife_A.BaseProj by bringing the commission components under the existing commissions(t) umbrella, mirroring the claims_* / claims_*_pp pattern.
  • Renames four cells: exps_comm_initcommissions_init, exps_comm_rencommissions_ren, exps_comm_init_ppcommissions_init_pp, exps_comm_ren_ppcommissions_ren_pp. Updates call sites in commissions / expenses and the autosummary/autofunction entries in BaseProj.rst.
  • Updates the Exps docstring example to exps_maint (no exps_comm_* cell remains as a representative).

Notes for reviewers

  • No test files referenced the renamed cells, so no test changes were required.
  • data.pickle and the _data/ directory were intentionally untouched — modelx reads cell definitions from __init__.py, and the prior standardization commit followed the same approach.
  • The output cell list inside tradlife_a-space-overview.ipynb is left to regenerate naturally on the next notebook execution.

Test plan

  • pytest lifelib/tests/libraries/test_tradlife_a.py — 3/3 pass
  • Smoke import via modelx: all four new cell names resolve, all four old names absent
  • Projection[1] exercise: commissions_init(0) = 588.47, commissions_ren(1) = 135.31, commissions_init_pp(0) = 588.47, commissions_ren_pp(1) = 147.12, with commissions(0) = commissions_init(0) as expected

🤖 Generated with Claude Code

Continues the cell-naming standardization started in 3f738b3.
The umbrella cell ``commissions(t)`` already aggregates initial and
renewal commissions, but the components still carried the legacy
``exps_comm_*`` prefix. Rename them so the family mirrors the
``claims_*`` / ``claims_*_pp`` pattern:

- ``exps_comm_init``     -> ``commissions_init``
- ``exps_comm_ren``      -> ``commissions_ren``
- ``exps_comm_init_pp``  -> ``commissions_init_pp``
- ``exps_comm_ren_pp``   -> ``commissions_ren_pp``

Updates the call sites in ``commissions`` and ``expenses``, the
``Exps`` docstring example (now ``exps_maint``, since no
``exps_comm_*`` cell remains), and the autosummary / autofunction
entries in ``BaseProj.rst``.

Verified by ``test_tradlife_a`` (3/3 pass) and a smoke check under
``Projection[1]`` confirming ``commissions(0)``, ``commissions_init``,
``commissions_ren`` and the ``_pp`` siblings produce the expected
non-zero values.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@fumitoh fumitoh merged commit 5e43507 into main May 9, 2026
17 checks passed
@fumitoh fumitoh deleted the claude/eager-shannon-abe08b branch May 10, 2026 15:14
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