API Reference
This page is auto-generated from Python docstrings.
pup_check
pup-check package.
__main__
Run as a module.
base
Base package.
types
Typed records.
CheckResult
dataclass
Result of one deterministic repository consistency check.
Source code in src/pup_check/base/types.py
8 9 10 11 12 13 14 | |
checks
Checks package.
entry_points
Project entry-point checks.
check_entry_points
check_entry_points(root: Path) -> tuple[CheckResult, ...]
Check that declared project-script modules exist.
Source code in src/pup_check/checks/entry_points.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
files
Repository file checks.
check_required_files
check_required_files(
context: RepositoryContext,
) -> tuple[CheckResult, ...]
Check required project files.
Source code in src/pup_check/checks/files.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
packages
Python package structure checks.
check_package_structure
check_package_structure(
context: RepositoryContext,
) -> CheckResult
Check that a src/ repository contains a detectable Python package.
Source code in src/pup_check/checks/packages.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
pyproject
pyproject.toml consistency checks.
check_pyproject
check_pyproject(root: Path) -> CheckResult
Check that pyproject.toml can be read and identifies the project.
Source code in src/pup_check/checks/pyproject.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
cli
Command-line interface for pup-check.
This module parses arguments and dispatches repository checking behavior.
Commands: uv run pup-check
Equivalent uvx usage after release: uvx pup-check uvx pup-check@latest
build_parser
build_parser() -> argparse.ArgumentParser
Build the argument parser.
Source code in src/pup_check/cli.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
main
main(argv: Sequence[str] | None = None) -> int
Run the command-line interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
argv
|
Sequence[str] | None
|
Optional command-line arguments. If None, uses sys.argv. |
None
|
Returns:
| Type | Description |
|---|---|
int
|
Exit code from the check command. |
Source code in src/pup_check/cli.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
commands
Command modules.
Each command module exposes a stable run(...) -> int entry point.
The CLI parser lives in pup_check.cli. Behavior lives here.
check
Check the repository for self-consistency.
run
run(*, root: Path | None = None) -> int
Check a repository for deterministic internal consistency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path | None
|
Repository root. If None, detect the current repository root. |
None
|
Returns:
| Type | Description |
|---|---|
int
|
Process exit code. Zero means all checks passed. |
Source code in src/pup_check/commands/check.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
write_terminal
Terminal reporting.
print_check_results
print_check_results(
context: RepositoryContext,
results: Sequence[CheckResult],
) -> None
Print repository check results.
Source code in src/pup_check/write_terminal.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |