Skip to content

feat: port programver package rewrite from rewrite-pkg onto master - #119

Merged
willtheorangeguy merged 1 commit into
masterfrom
port/rewrite-pkg
Aug 29, 2026
Merged

feat: port programver package rewrite from rewrite-pkg onto master#119
willtheorangeguy merged 1 commit into
masterfrom
port/rewrite-pkg

Conversation

@willtheorangeguy

Copy link
Copy Markdown
Owner

Summary

rewrite-pkg (152 commits) shares no git history with master (163 commits — main's history was rewritten/squashed after this branch was cut), so gh pr create fails outright with "no history in common" and a literal rebase would replay 152 unrelated commits onto master's unrelated tree. This PR ports rewrite-pkg's actual end state onto current master by hand instead.

  • Replaces the flat main.py/__init__.py/__main__.py/imgs/ layout with a real programver package: VersionDialog (programver/dialog.py), a TextViewer license/EULA window (programver/_text_viewer.py), root/Toplevel + bundled-image helpers (programver/_utils.py), bundled imgs/ under the package. main.py becomes a runnable demo of the package.
  • tests/test_main.py rewritten against the new package (27 tests).
  • Packaging config (pyproject.toml/setup.py/setup.cfg/MANIFEST.in) updated to declare programver as the actual package — previously packages.find pointed at imgs/, which had no Python code in it.
  • Adds EULA.md (the demo needs it).
  • .github/workflows/tests.yml: --cov=.--cov=programver.

This also fixes the exact breakage master's own docs (README.md "Status", docs/internal/known-issues.md) had documented: main.py referenced imgs/dfdlogo.gif, LICENSE.txt, and EULA.txt, none of which existed, so the window could never open. Both docs are updated here to reflect the fix.

Reconciled by hand against master's independent history rather than taken verbatim from rewrite-pkg:

  • Kept master's newer CI action versions and requirements.txt pytest floor (>=9.1.1) instead of rewrite-pkg's older pins.
  • Kept the [tool.bandit] pyproject.toml section master added after the branches diverged.
  • Did not bring back CODE_OF_CONDUCT.md/CONTRIBUTING.md/SECURITY.md, which master deliberately removed in favor of inheriting them from the willtheorangeguy/.github org repo (commit b55c5bf) — restoring them would silently reverse that decision.
  • Updated CLAUDE.md's architecture section to describe the programver package instead of the deleted flat-file layout.
  • Left master's MkDocs documentation site structure alone (it's live, externally-templated infra this port shouldn't restructure blind) but flagged each page as describing the pre-2.0 layout, and fixed README.md's Status/Installation/Usage sections plus known-issues.md's per-issue resolution status.

Test plan

  • pytest tests/ -v --cov=programver — 27 passed
  • pylint $(git ls-files '*.py') — 10.00/10, matching master's pre-existing clean baseline
  • python -m build --wheel — package builds and includes the right files
  • python -c "from programver import VersionDialog; VersionDialog(...)" — imports and constructs correctly

Verified locally; Actions minutes are exhausted for this repo so CI could not be run remotely.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y38yxr1x54TZQgwdcHUbtE

rewrite-pkg (152 commits) shares no git history with master (163 commits,
history rewritten after the branch was cut), so it could not be opened as a
PR directly. This ports its end state onto current master by hand instead of
attempting a literal rebase of 152 unrelated commits.

What's ported (matches rewrite-pkg's tip):
- The flat main.py/__init__.py/__main__.py/imgs/ layout is replaced by a real
  `programver` package: `VersionDialog` (programver/dialog.py), a
  `TextViewer` license/EULA window (programver/_text_viewer.py), root/
  Toplevel + bundled-image helpers (programver/_utils.py), and bundled
  imgs/ under the package. `main.py` becomes a runnable demo of the package
  rather than the library itself.
- tests/test_main.py rewritten against the new package (27 tests).
- pyproject.toml/setup.py/setup.cfg/MANIFEST.in updated to declare
  `programver` as the package (previously `packages.find` pointed at
  `imgs/`, which contained no Python code).
- EULA.md added (main.py's demo needs it).
- .github/workflows/tests.yml: --cov=. -> --cov=programver.

This also fixes the exact breakage master's own docs called out: main.py
referenced imgs/dfdlogo.gif, LICENSE.txt and EULA.txt, none of which existed
in the repo, so the window could never open (see README "Status" and
docs/internal/known-issues.md, both pre-existing on master, both updated
here to reflect the fix instead of describing it as open).

Reconciled by hand against master's independent history rather than taken
verbatim from rewrite-pkg:
- Kept master's newer CI action versions (checkout/setup-python/codeql) and
  requirements.txt pytest floor (>=9.1.1) instead of rewrite-pkg's older
  pins from before those were bumped.
- Kept the [tool.bandit] pyproject.toml section, which master added after
  the branches diverged and rewrite-pkg's copy doesn't know about.
- Did NOT bring back CODE_OF_CONDUCT.md/CONTRIBUTING.md/SECURITY.md, which
  master deliberately removed in favor of inheriting them from the
  willtheorangeguy/.github org repo (commit b55c5bf) - re-adding them would
  silently reverse that decision.
- Updated CLAUDE.md's architecture section, which described the deleted
  flat-file layout, to describe the programver package instead.
- Kept master's MkDocs documentation site as-is (it's live, externally
  templated infrastructure this port shouldn't restructure blind) but
  flagged each page as describing the pre-2.0 layout, and updated
  README.md's Status/Installation/Usage sections and
  docs/internal/known-issues.md's per-issue resolution status so the most
  visible docs don't keep claiming the program is broken after this fixes it.

Verified locally (Actions minutes are exhausted): pytest (27 passed, this
repo's actual test suite), pylint on all tracked .py files (10.00/10,
matching master's pre-existing clean baseline), and `python -m build
--wheel` to confirm the new package layout actually packages correctly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y38yxr1x54TZQgwdcHUbtE
@willtheorangeguy
willtheorangeguy merged commit dd76b0a into master Aug 29, 2026
12 of 14 checks passed
@willtheorangeguy
willtheorangeguy deleted the port/rewrite-pkg branch August 29, 2026 02:59
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