Skip to content

Further extraction needed: bump.py and publish.py still exceed 400-line guideline #170

Description

@coderabbitai

Summary

Follow-up from PR #136 (issue #108): two source files still exceed the project's 400-line guideline and require further extraction beyond what was completed in that PR.

Affected files

  • lading/commands/bump.py — still ~27 lines over the 400-line limit. Docstring trimming alone cannot close the gap; further logic extraction is required (in the spirit of the bump_manifests.py split already landed).
  • lading/commands/publish.py — 741 lines, deliberately deferred from PR Bring oversized files under the 400-line guideline (#108) #136.

Rationale for deferral

Extracting publish.py is a substantial, non-minimal task because it requires:

  1. Reconciling main's Add syrupy snapshot tests for 'already published' warning in _handle_publish_result #73/De-duplicate _run_preflight_checks / _preflight_argument_sets to a single home #96 refactor with the pipeline extraction done in PR Bring oversized files under the 400-line guideline (#108) #136 (lading/commands/publish_pipeline.py).
  2. Rewriting the many monkeypatch.setattr(publish, …) test seams to target publish_pipeline instead, per the project's no-compat convention (no shim/back-compat layers).

This was judged unsuited to the review-fix pass on PR #136 and tracked here as the agreed follow-up.

Acceptance criteria

  • lading/commands/bump.py is at or below 400 lines through further logic extraction (not just docstring trimming).
  • lading/commands/publish.py is at or below 400 lines, with responsibilities distributed to publish_pipeline.py and/or other new modules as appropriate.
  • All monkeypatch.setattr(publish, …) test seams are updated to target the correct module post-extraction, with no compatibility shims left behind.
  • docs/developers-guide.md extraction map is updated to reflect the new module boundaries.
  • make lint, make typecheck, and make test pass.

References

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions