Opinionated professional Python repository cleaner
pup-clean prepares instructor repositories for release as student project
templates.
It removes known disposable development artifacts and inspects project source code to discover generated data, database, and image artifacts that should not be included in the student version of the repository.
Dry run is the default.
Nothing is deleted unless --delete is provided.
# see what would be removed (dry run, the default)
uvx pup-clean
# use the latest published version
uvx pup-clean@latest
# remove all detected generated artifacts (CAUTION: DESTRUCTIVE)
uvx pup-clean --delete
# preview only specified cleanup targets
uvx pup-clean project.log data/prepared/sales.csv
# delete only specified detected cleanup targets (CAUTION: DESTRUCTIVE)
uvx pup-clean --delete project.log data/prepared/sales.csv docs/images/sales_by_region.pngShow command reference
Open a machine terminal where you want the project:
git clone https://github.com/pup-pack/pup-clean
cd pup-clean
code .uv self update
uv python pin 3.15
uv python install
uv lock --upgrade
uv sync
uv run pre-commit install
uv run pre-commit autoupdate
git add -A
uv run pre-commit run --all-files
# repeat if changes were made
uv run pre-commit run --all-files
# run locally to test and see all detected cleanup targets
uv run pup-clean
# delete all detected cleanup targets (CAUTION: DESTRUCTIVE)
uv run pup-clean --delete
# preview only specified cleanup targets
uv run pup-clean project.log data/prepared/sales.csv
# delete only specified detected cleanup targets (CAUTION: DESTRUCTIVE)
uv run pup-clean --delete project.log data/prepared/sales.csv docs/images/sales_by_region.png
# types, tests, docs
uv run ty check
uv run python -m pytest
uv run python -m zensical build
# save progress
git add -A
git commit -m "update"
git push -u origin main