Skip to content

Repository files navigation

pup-clean: Professional Python Project: Instructor Repo Cleaner

PyPI Docs Site Repo Python 3.15 License

CI Docs-Deploy Pre-Release Release Links Dependabot

pup logo

Opinionated professional Python repository cleaner

Purpose

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.

Clean a Repository

# 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.png

Developer Command Reference

Show command reference

In a machine terminal

Open a machine terminal where you want the project:

git clone https://github.com/pup-pack/pup-clean

cd pup-clean
code .

In a VS Code terminal

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

Documentation

Annotations

.annotations/annotations.md

Citation

CITATION.cff

License

MIT

Releases

Packages

Used by

Contributors

Languages