You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update CLAUDE.md with comprehensive codebase documentation
Add CI workflow details, file reference table, test class inventory,
entry point documentation, and coding convention details to give AI
assistants a complete picture of the project structure.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NS99cT6Wysv4m21LXqihx
Copy file name to clipboardExpand all lines: CLAUDE.md
+48-8Lines changed: 48 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
ProgramVer is a Python/tkinter GUI app that replicates Microsoft's `winver` — it displays a customizable window with program version info, copyright notices, and buttons to open a License or EULA file in a secondary window. It is published to PyPI and is designed to be forked and customized per-program.
7
+
ProgramVer is a Python/tkinter GUI app that replicates Microsoft's `winver` — it displays a customizable window with program version info, copyright notices, and buttons to open a License or EULA file in a secondary window. It is published to PyPI as `programver`and is designed to be forked and customized per-program. Current version: **1.9.0**.
8
8
9
9
## Commands
10
10
@@ -25,10 +25,10 @@ python -m pytest tests/ -v
25
25
### Run a single test
26
26
```bash
27
27
# Linux
28
-
xvfb-run -a python -m pytest tests/test_main.py::TestProgramVer::test_name -v
28
+
xvfb-run -a python -m pytest tests/test_main.py::TestClassName::test_name -v
All application logic lives in a single module: **`main.py`**. It exposes four functions:
47
47
48
48
-`get_resource_path(filename)` — resolves paths relative to the module file (needed for PyPI installs where the CWD may differ from the package location).
49
-
-`ProgramVer()` — builds and runs the main tkinter window: logo images, version/copyright labels, and two buttons.
49
+
-`ProgramVer()` — builds and runs the main tkinter window: logo images, version/copyright labels, and two buttons. Calls `window.mainloop()` so it blocks until the window is closed.
50
50
-`openLicense()` — opens `LICENSE.txt` in a new `Tk()` window.
51
51
-`openEULA()` — opens `EULA.txt` in a new `Tk()` window.
52
52
53
-
`__main__.py` is the entry point; it just calls `ProgramVer()`. `setup.cfg` / `pyproject.toml` register the `programver` console script pointing at `main:ProgramVer`.
**Customization intent:** The strings inside `ProgramVer()` (window title, version label, trademark text, license blurb) and the image files in `imgs/` are expected to be replaced when the project is forked. `LICENSE.txt` and `EULA.txt` in the repo root are the files opened at runtime.
56
72
57
73
## Testing
58
74
59
-
Tests are in `tests/test_main.py` using `unittest.TestCase`. All tkinter calls are mocked with `unittest.mock.patch` so tests run headlessly. The `# pylint: disable=import-error, invalid-name` comments at the top of both `main.py` and `test_main.py` are intentional — do not remove them.
75
+
Tests are in `tests/test_main.py` using `unittest.TestCase` with five test classes:
76
+
77
+
-`TestGetResourcePath` — path resolution helper
78
+
-`TestOpenLicense` — license window creation and content display
79
+
-`TestOpenEULA` — EULA window creation and content display
80
+
-`TestProgramVer` — main window components (images, labels, buttons, commands)
81
+
-`TestModuleIntegration` — import and callable checks
82
+
83
+
All tkinter calls are mocked with `unittest.mock.patch` so tests run headlessly.
84
+
85
+
### CI Workflows (`.github/workflows/`)
86
+
87
+
| Workflow | Trigger | What it does |
88
+
|----------|---------|--------------|
89
+
|`tests.yml`| push/PR to `master`| Runs pytest across Ubuntu/Windows/macOS x Python 3.9-3.12; uploads coverage to Codecov |
90
+
|`pylint.yml`| any push | Runs pylint on all `.py` files (Python 3.9) |
|`push-to-pypi.yml`| GitHub release published | Builds and publishes to PyPI |
60
93
61
-
CI runs the full matrix: Ubuntu, Windows, macOS × Python 3.9–3.12. Coverage target is 100% for `main.py`.
94
+
The default branch is `master`.
62
95
63
96
## Coding Conventions
64
97
65
98
- 4-space indentation (no tabs).
66
99
- Semantic Versioning for releases.
67
-
- Version number appears in `main.py` (the `info` label), `pyproject.toml`, `setup.cfg`, and `setup.py` — update all four on a version bump.
100
+
- Version number appears in **four places** — update all on a version bump:
101
+
1.`main.py` (the `info` label text)
102
+
2.`pyproject.toml` (`[project] version`)
103
+
3.`setup.cfg` (`[metadata] version`)
104
+
4.`setup.py` (`version` kwarg)
105
+
- The `# pylint: disable=import-error, invalid-name` comments at the top of `main.py`, `__main__.py`, `__init__.py`, and `test_main.py` are intentional — do not remove them.
106
+
-`test_main.py` also disables `wrong-import-position`, `import-outside-toplevel`, and `unused-argument` — do not remove these either.
107
+
- Black is configured as the code formatter via `.deepsource.toml`.
0 commit comments