Skip to content

Commit 086ebb9

Browse files
committed
docs: improve docs
1 parent 6f96390 commit 086ebb9

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

.github/workflows/tests.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@ jobs:
1414
- name: 🛎️ Check out repository
1515
uses: actions/checkout@v4
1616

17-
- name: 📦 Set up UV
17+
- name: 📦 Set up uv
1818
uses: astral-sh/setup-uv@v5
1919
with:
20-
version: "0.6.5"
20+
version: "0.6.12" # reminder: keep aligned with the pre-commit hooks
2121
enable-cache: true
2222

2323
- name: 🐍 Set up Python
2424
uses: actions/setup-python@v5
2525
with:
26-
python-version: 3.11
2726
python-version-file: "pyproject.toml"
2827

2928
- name: 🔨 Install dependencies
30-
run: uv sync --group test
29+
run: uv sync --no-default-groups --group test
3130

3231
- name: ✅ Run unit tests
3332
run: uv run pytest -vvv

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ repos:
3232
name: Validate Python
3333

3434
- repo: https://github.com/astral-sh/uv-pre-commit
35-
rev: 0.6.12
35+
rev: 0.6.12 # reminder: keep aligned with the GitHub actions
3636
hooks:
3737
- id: uv-lock
3838
name: Check that the lock file is up-to-date

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22

3-
[![Python](https://img.shields.io/badge/Python-3.11+-blue.svg)](https://www.python.org/downloads/release/python-3110/)
3+
[![Python](https://img.shields.io/badge/Python-3.11+-blue.svg)](https://www.python.org/downloads/)
44
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
55
[![tests](https://github.com/Bilbottom/python-template/actions/workflows/tests.yaml/badge.svg)](https://github.com/Bilbottom/python-template/actions/workflows/tests.yaml)
66
[![coverage](coverage.svg)](https://github.com/dbrgn/coverage-badge)
@@ -22,3 +22,12 @@ After copying, find and replace on:
2222

2323
- `python-template` -> new repo name
2424
- `src` -> new package name (optional)
25+
26+
## Quick start
27+
28+
Install [uv](https://docs.astral.sh/uv/getting-started/installation/) and then enable [pre-commit](https://pre-commit.com/):
29+
30+
```bash
31+
uv sync --all-groups
32+
pre-commit install --install-hooks
33+
```

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ test = [
2222
]
2323

2424

25+
[tool.setuptools]
26+
packages = ["src"]
27+
28+
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
29+
#[tool.setuptools.packages.find]
30+
#include = ["src"]
31+
32+
2533
[tool.pytest.ini_options]
2634
addopts = "--cov=src --cov-fail-under=80"
2735
testpaths = ["tests"]

0 commit comments

Comments
 (0)