Skip to content

Drop redundant module-level header constants (#505)#512

Merged
jepegit merged 1 commit into
masterfrom
505-headers-single-source
Jul 16, 2026
Merged

Drop redundant module-level header constants (#505)#512
jepegit merged 1 commit into
masterfrom
505-headers-single-source

Conversation

@jepegit

@jepegit jepegit commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Closes #505 — final item of the v2 Phase 0 gate (epic #402).

What

Removes the redundant module-level HEADERS_NORMAL / HEADERS_SUMMARY /
HEADERS_STEP_TABLE constants (all carrying # TODO refactor this (not needed))
from cellreader.py and data_structures.py:

  • CellpyCell.split_many / with_cycles use the existing self.headers_*
    instance attributes.
  • Module-level functions in data_structures.py call the get_headers_*()
    accessors from internal_settings directly.
  • Now-unused imports dropped.

No third copy of header definitions remains; internal_settings (backed by the
core parity contract, #378) is the single source. No external code imported these
constants (verified by grep).

Verification

  • uv run pytest -m essential: 93 passed
  • Full uv run pytest: 592 passed, 62 skipped, 14 xfailed, 0 failures

With #385 (merged today) and #504 (closed — already done by #451), this
completes Phase 0; v2 feature work (#506) is unblocked.

🤖 Generated with Claude Code

Remove the HEADERS_NORMAL / HEADERS_SUMMARY / HEADERS_STEP_TABLE module
constants (marked "TODO refactor this (not needed)") from cellreader.py and
data_structures.py. CellpyCell methods use the existing self.headers_*
instance attributes; module-level functions call the get_headers_*()
accessors from internal_settings. Drop the now-unused imports.

No third copy of header definitions remains; the header-parity contract
tests (#378) guard the single source. Part of the v2 Phase 0 gate (epic #402).

Closes #505.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jepegit jepegit added the v2 cellpy v2.0 epic work - PRs should target the master branch label Jul 16, 2026
@cursor

cursor Bot commented Jul 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Cursor Bugbot was not configured for this repository, so that signal was skipped; the change is a straightforward header-constant cleanup with no applicable approval policies requiring human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@jepegit
jepegit merged commit 1b97382 into master Jul 16, 2026
4 checks passed
@jepegit
jepegit deleted the 505-headers-single-source branch July 16, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 cellpy v2.0 epic work - PRs should target the master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v2 gate: drop redundant header constants in cellreader (single source)

1 participant