Skip to content

Commit 3e1fcbd

Browse files
authored
Merge pull request #63 from taskbadger/sk/conventional-commits
chore: adopt conventional commits and grouped release notes
2 parents 39ffb8c + 0043b4d commit 3e1fcbd

2 files changed

Lines changed: 53 additions & 6 deletions

File tree

.github/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- duplicate
5+
- invalid
6+
- wontfix
7+
categories:
8+
- title: ⚠️ Breaking Changes
9+
labels:
10+
- breaking
11+
- title: 🚀 Features
12+
labels:
13+
- feat
14+
- enhancement
15+
- title: 🐛 Bug Fixes
16+
labels:
17+
- fix
18+
- bug
19+
- title: 📚 Documentation
20+
labels:
21+
- docs
22+
- documentation
23+
- title: 🧹 Maintenance
24+
labels:
25+
- chore
26+
- refactor
27+
- perf
28+
- test
29+
- ci
30+
- title: Other Changes
31+
labels:
32+
- "*"

CLAUDE.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Official Python client for [Task Badger](https://taskbadger.net/). Public packag
66

77
```bash
88
uv sync --frozen # Install deps (incl. dev + cli extras via dependency-groups)
9-
uv run pytest # Run unit tests (integration_tests/ is excluded by default)
10-
uv run pytest integration_tests -vs # Run integration tests (needs Redis + TASKBADGER_API_KEY)
9+
uv run pytest # Run unit tests (needs Redis; integration_tests/ excluded by default)
10+
uv run pytest integration_tests -vs # Run integration tests (needs Redis + Postgres + API key)
1111
uv run ruff check . --fix # Lint
1212
uv run ruff format . # Format
1313
uv build # Build sdist + wheel
@@ -20,7 +20,10 @@ Pre-commit runs ruff-check + ruff-format; install with `uv run pre-commit instal
2020
- `taskbadger/` — SDK source
2121
- `sdk.py`, `mug.py`, `safe_sdk.py` — public API surface (re-exported from `__init__.py`)
2222
- `decorators.py``@track` decorator
23-
- `systems/`, `celery.py` — Celery integration (optional extra)
23+
- `celery.py`, `procrastinate.py` — per-queue integrations (optional extras)
24+
- `systems/`, `_integrations.py` — auto-tracking layer (`BaseSystemIntegration`) wired onto a Celery/Procrastinate app
25+
- `context_providers/`, `_error_context.py` — pluggable error context (e.g. Sentry issue links) via `init(context_providers=[...])`
26+
- `_heartbeat.py` — background thread pinging long-running tasks
2427
- `cli/`, `cli_main.py` — Typer-based CLI (optional `[cli]` extra)
2528
- `internal/`**generated** by `openapi-python-client`; do not hand-edit
2629
- `tests/` — unit tests (pytest, pytest-httpx)
@@ -40,9 +43,18 @@ The `update-api` invoke task curls `localhost:8000/api/schema.json` by default
4043

4144
- Ruff: line-length 120, target Python 3.10, rules `E F I UP DJ PT`.
4245
- Supports Python 3.10–3.14 — don't use 3.11+ syntax (e.g. `Self`, `LiteralString`).
43-
- Celery and CLI deps are optional; guard imports inside `taskbadger/celery.py`, `taskbadger/systems/celery.py`, `taskbadger/cli/`.
46+
- Extras (`celery`, `procrastinate`, `cli`, `sentry`) are all optional; keep their imports inside the corresponding module (`taskbadger/celery.py`, `taskbadger/procrastinate.py`, `taskbadger/systems/`, `taskbadger/cli/`, `taskbadger/context_providers/sentry.py`).
4447
- `taskbadger/internal/*` is generator output — lint is best-effort, don't reformat manually.
4548

49+
## Commits and PRs
50+
51+
Conventional Commits for commit subjects and PR titles: `type(scope): summary`.
52+
53+
- Types: `feat` `fix` `docs` `chore` `refactor` `perf` `test` `ci`. Breaking: `feat!:` / `fix!:` plus a `BREAKING CHANGE:` footer.
54+
- Scopes (optional): `celery`, `procrastinate`, `cli`, `sdk`, `sentry`, `internal`.
55+
- **Label every PR with its type** (`feat`, `fix`, …). Release notes are auto-generated from PR titles and grouped by label via `.github/release.yml`; an unlabelled PR falls into "Other Changes".
56+
- PRs merge as merge commits, so only PR titles reach the changelog — commit subjects are history hygiene.
57+
4658
## Releasing
4759

4860
```bash
@@ -54,5 +66,8 @@ GitHub Actions then drafts a release; publishing the release triggers `publish.y
5466
## Gotchas
5567

5668
- `pytest` skips `integration_tests/` via `norecursedirs` — name them explicitly to run.
57-
- Integration tests need `TASKBADGER_ORG`, `TASKBADGER_PROJECT`, `TASKBADGER_API_KEY` env vars and a running Redis.
58-
- Imports of `celery`, `typer`, `rich` must stay optional — only the core httpx/attrs deps are guaranteed.
69+
- Integration tests need `TASKBADGER_ORG`, `TASKBADGER_PROJECT`, `TASKBADGER_API_KEY`, a running Redis, and Postgres via `PROCRASTINATE_DSN` (defaults to `postgresql://postgres:postgres@localhost:5432/procrastinate`).
70+
- Unit tests also need Redis — `tests/conftest.py` points Celery at `redis://localhost:6379` so serialization is exercised for real.
71+
- Don't unpin `openapi-python-client<0.29` — 0.29 generates `datetime.fromisoformat` calls that can't parse the API's `Z`-suffixed timestamps on Python 3.10.
72+
- User-facing features are documented in `README.md`, not a docs site — add a section there when adding one.
73+
- Only the core httpx/attrs/dateutil/tomlkit deps are guaranteed at runtime.

0 commit comments

Comments
 (0)