Skip to content

Commit c9d001f

Browse files
committed
docs: update README and USAGE to describe uv-first workflow, Makefile, pre-commit and wheelhouse guidance
1 parent 76f48fb commit c9d001f

File tree

2 files changed

+93
-32
lines changed

2 files changed

+93
-32
lines changed

README.md

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ A modern scaffolding tool for creating new Python packages with best practices b
55
## Features
66

77
- **Fast Setup**: Create fully-configured Python packages in seconds
8-
- **uv Integration**: Modern dependency management with `uv`
8+
- **uv Integration**: Modern dependency & venv management using `uv`
99
- **Testing Ready**: Pre-configured `pytest` with coverage
10-
- **Documentation**: Sphinx docs with `furo` theme
11-
- **CI/CD**: GitHub Actions workflow included
12-
- **Best Practices**: PEP 8 compliant, type hints, proper structure
10+
- **Documentation**: Sphinx docs included
11+
- **CI/CD**: uv-first GitHub Actions workflow (single canonical `ci.yml`)
12+
- **Best Practices**: PEP 8 compliant, type hints, pre-commit hooks, type checking
1313

1414
## Installation
1515

@@ -58,10 +58,11 @@ The tool automatically:
5858
1. ✅ Validates inputs
5959
2. ✅ Creates project structure
6060
3. ✅ Initializes git repository
61-
4. ✅ Sets up `uv` virtual environment
61+
4. ✅ Sets up `uv` virtual environment (preferred)
6262
5. ✅ Installs dev dependencies
6363
6. ✅ Runs initial tests
64-
7. ✅ Builds documentation
64+
7. ✅ Installs and runs `pre-commit` hooks
65+
8. ✅ Builds documentation
6566

6667
## Example
6768

@@ -82,32 +83,55 @@ pytest
8283
sphinx-build -b html docs docs/_build/html
8384
```
8485

85-
## Development
86+
# Development
87+
88+
Local development is uv-first. Use the provided Makefile for convenience or run uv directly.
89+
90+
Using the Makefile (recommended):
8691

8792
```bash
88-
# Clone the repository
89-
git clone https://github.com/Magic-Man-us/PythonProjectDeployment.git
90-
cd python-project-deployment
93+
# Create or refresh a uv venv and install dev deps
94+
make install
95+
96+
# Run the test suite
97+
make test
9198

92-
# Install in development mode
99+
# Run linters and type checks
100+
make lint
101+
make type
102+
103+
# Apply formatting (Black/isort)
104+
make format
105+
106+
# Run pre-commit hooks locally
107+
make precommit
108+
```
109+
110+
Direct uv commands:
111+
112+
```bash
113+
# Create a venv and install dev extras
93114
uv venv
94115
uv pip install -e ".[dev]"
95116

96117
# Run tests
97-
pytest
118+
uv run pytest
98119

99-
# Format code
100-
black .
101-
isort .
120+
# Run linters
121+
uv run ruff check .
122+
uv run mypy python_project_deployment
102123

103-
# Type check
104-
mypy python_project_deployment
124+
# Run pre-commit
125+
uv run pre-commit install
126+
uv run pre-commit run --all-files
105127
```
106128

107129
## Requirements
108130

109-
- Python 3.10+
110-
- uv (recommended) or pip
131+
- Python 3.11+ (recommended)
132+
- uv (strongly recommended) — the scaffolder / CI are uv-first
133+
134+
If `uv` is not available, the tool will try to fall back to `pip`, but behaviour and reproducibility are better with `uv`.
111135

112136
## License
113137

USAGE.md

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ scaffold-python data_analyzer /home/user/projects \
4444

4545
### Verbose Mode
4646

47+
## Installation
48+
49+
The tool is installed in editable mode and ready to use (uv-first):
50+
51+
```bash
52+
# Create or refresh a uv venv
53+
uv venv
54+
55+
# Install in editable mode with development extras
56+
uv pip install -e ".[dev]"
57+
```
4758
See detailed progress:
4859

4960
```bash
@@ -80,29 +91,55 @@ After creating your package:
8091

8192
```bash
8293
# Navigate to the project
94+
### Post-Creation Workflow
95+
96+
After creating your package follow this uv-first workflow:
97+
98+
```bash
99+
# Navigate to the project
100+
cd /path/to/your/my_package
101+
102+
# Use uv for any command (preferred)
103+
uv run python -c "import my_package; print(my_package.hello())"
104+
105+
# Run tests
106+
uv run pytest
107+
108+
# Run tests with coverage
109+
uv run pytest --cov=my_package
110+
111+
# View coverage report (HTML)
112+
open htmlcov/index.html
113+
114+
# Build documentation (Sphinx)
115+
uv run python -m sphinx -b html docs docs/_build/html
116+
open docs/_build/html/index.html
117+
118+
# Format code
119+
uv run python -m black .
120+
uv run isort .
121+
122+
# Type checking
123+
uv run mypy my_package
124+
125+
# Linting
126+
uv run ruff check my_package
127+
128+
# Run pre-commit hooks
129+
uv run pre-commit install
130+
uv run pre-commit run --all-files
131+
```
83132
cd /path/to/your/my_package
84133

85134
# Activate virtual environment
86-
source .venv/bin/activate
87-
88-
# Or use uv run for any command
89135
uv run python -c "import my_package; print(my_package.hello())"
90136

91-
# Run tests
92-
pytest
93-
94137
# Run tests with coverage
95138
pytest --cov=my_package
96-
97-
# View coverage report
98-
open htmlcov/index.html
99-
100139
# Build documentation
101140
sphinx-build -b html docs docs/_build/html
102-
open docs/_build/html/index.html
103141

104-
# Format code
105-
black .
142+
Our CI is uv-first and now uses a single canonical workflow: `.github/workflows/ci.yml`. It sets up `uv`, installs Python versions, syncs dependencies, and runs linters, mypy, pre-commit, tests and security scans.
106143
isort .
107144

108145
# Type check

0 commit comments

Comments
 (0)