Update README, fix bugs from code review, switch to uv - #23
Merged
Merged
Conversation
…sion or binary file
… comments mapping
Bonajo
added a commit
that referenced
this pull request
Sep 21, 2026
## Summary Same release pipeline as classroom and create-codegrade-assignment: - **PR title check** (`pr-title.yml`, job `conventional title`): PR titles must follow Conventional Commits, because with squash merging the title becomes the commit on `main`. - **Semantic release** (`semantic-release.yml` + `.releaserc.json`): on every push to `main` the next version is determined from the commit subjects, tagged `vX.Y.Z` and a GitHub release is created. - **PyPI publish** (`pypi-publish.yml`, reusable): when a new version is released, `uv version <version> --frozen`, `uv build` and `uv publish` (with `PYPI_TOKEN`). The version is set at build time and not committed back to `main`. - **`release.yml`**: now only an escape hatch for manually pushed `v*` tags, calling the same publish workflow. Tags pushed by semantic-release (with `GITHUB_TOKEN`) do not trigger it, so nothing is published twice. - **README**: new "Releases" section with the PR title conventions. This PR is titled `feat:` on purpose: on merge, the first automated release will be **v1.3.0** (the commits since v1.2.0 from #23 would otherwise only give a patch release). ## Testing Workflow files parse; locally `uv version 1.3.0 --frozen` + `uv build` on a clean copy produces `codestripper-1.3.0` without changing `uv.lock`. The release and PyPI upload can only be verified after merge.
|
🎉 This PR is included in version 1.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
The README no longer matched the code, so it was updated. A full code review then found a number of bugs and inconsistencies, which are fixed here one commit at a time. The project is also moved from Poetry to uv.
README
-x,--dry-run,-e,-b,-u,-cformat), plus supported comment styles and a Python module example.default_tags, class diagram names).Bug fixes
-b/--binaryand-u/--unknownnow work on the command line (they were rejected by argparse and never passed on).fail: log the error and continue with the other files, then raiseStripErrorat the end iffail_on_error(was:break, or a rawUnicodeDecodeError)..xml,.ml).--dry-runprints the stripped files to stdout (was only visible with-vv).-cis validated (clear error), the extension is lowercased and the global comment mapping is no longer mutated.get_working_directoryresolves the path first, so-w ../xand symlinks cannot escape the current directory.FileUtilsno longer changes the process working directory, and glob characters in the working directory are handled.cs:ignoreonly matches as a whole tag (cs:ignoredno longer ignores the file).**/*.javano longer strips the previous output).Behaviour changes to be aware of
strip_files(..., fail_on_error=True)is now the default (same as the command line). Failing files raiseStripErrorafter all files are processed.StripError(exported fromcodestripper).>=3.10(CI already only tested 3.10 to 3.12).Tooling
pyproject.tomlwith[project],uv_build,uv.lock); workflows useastral-sh/setup-uv.uv run ruff check, PyCharm-like settings, line length 120); unused imports and dead code removed./tmp/pytest-of-{user}vulnerability (pytest < 9.0.3).Testing
136 tests pass locally (Python 3.14),
mypyandruff checkare clean. Not yet run on Windows and macOS, and not on Python 3.10 to 3.12; CI will cover that. Therelease.ymlworkflow (uv build/uv publish) is untested.