feat: port programver package rewrite from rewrite-pkg onto master - #119
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rewrite-pkg(152 commits) shares no git history withmaster(163 commits — main's history was rewritten/squashed after this branch was cut), sogh pr createfails outright with "no history in common" and a literal rebase would replay 152 unrelated commits onto master's unrelated tree. This PR portsrewrite-pkg's actual end state onto currentmasterby hand instead.main.py/__init__.py/__main__.py/imgs/layout with a realprogramverpackage:VersionDialog(programver/dialog.py), aTextViewerlicense/EULA window (programver/_text_viewer.py), root/Toplevel + bundled-image helpers (programver/_utils.py), bundledimgs/under the package.main.pybecomes a runnable demo of the package.tests/test_main.pyrewritten against the new package (27 tests).pyproject.toml/setup.py/setup.cfg/MANIFEST.in) updated to declareprogramveras the actual package — previouslypackages.findpointed atimgs/, which had no Python code in it.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.pyreferencedimgs/dfdlogo.gif,LICENSE.txt, andEULA.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:requirements.txtpytest floor (>=9.1.1) instead ofrewrite-pkg's older pins.[tool.bandit]pyproject.tomlsection master added after the branches diverged.CODE_OF_CONDUCT.md/CONTRIBUTING.md/SECURITY.md, which master deliberately removed in favor of inheriting them from thewilltheorangeguy/.githuborg repo (commitb55c5bf) — restoring them would silently reverse that decision.CLAUDE.md's architecture section to describe theprogramverpackage instead of the deleted flat-file layout.README.md's Status/Installation/Usage sections plusknown-issues.md's per-issue resolution status.Test plan
pytest tests/ -v --cov=programver— 27 passedpylint $(git ls-files '*.py')— 10.00/10, matching master's pre-existing clean baselinepython -m build --wheel— package builds and includes the right filespython -c "from programver import VersionDialog; VersionDialog(...)"— imports and constructs correctlyVerified 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