Skip to content

Commit 990557d

Browse files
authored
chore: update contributing guide and enable CI on develop branch
* Updates the contributing guide with local setup instructions using uv, and adds steps for running lint, formatting, type checks, tests, and docs preview before opening a PR. *Extends the CI workflow to also trigger on pushes and pull requests targeting the develop branch.
2 parents 8fbdd19 + 101989c commit 990557d

2 files changed

Lines changed: 58 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, develop]
66
pull_request:
7-
branches: [main]
7+
branches: [main, develop]
88

99
jobs:
1010
test:

docs/contributing.md

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,71 @@ For smaller changes like typo fixes, documentation improvements, or obvious bug
2020

2121
### Local setup
2222

23+
The project uses [uv](https://docs.astral.sh/uv/) for dependency management.
24+
2325
```bash
2426
git clone https://github.com/Attakay78/fastapi-taskflow
2527
cd fastapi-taskflow
26-
pip install -e ".[dev]"
28+
uv sync
29+
```
30+
31+
PRs should target the `develop` branch, not `main`.
32+
33+
### Checks to run before opening a PR
34+
35+
Run all of the following and make sure they pass cleanly.
36+
37+
**Lint**
38+
39+
```bash
40+
uv run ruff check .
41+
```
42+
43+
**Format**
44+
45+
```bash
46+
uv run ruff format --check .
47+
```
48+
49+
To auto-fix formatting:
50+
51+
```bash
52+
uv run ruff format .
2753
```
2854

29-
### Running tests
55+
**Type checking**
56+
57+
```bash
58+
uv run mypy fastapi_taskflow
59+
```
60+
61+
**Tests**
62+
63+
```bash
64+
uv run pytest
65+
```
66+
67+
All tests must pass. If you are adding a feature, include tests that cover the new behaviour.
68+
69+
### Docs and README
70+
71+
If your change affects user-facing behaviour, update the relevant page under `docs/` or `README.md` before opening the PR.
72+
73+
To preview the docs site locally:
74+
75+
```bash
76+
uv run mkdocs serve
77+
```
78+
79+
Then open [http://127.0.0.1:8000/fastapi-taskflow](http://127.0.0.1:8000/fastapi-taskflow) in your browser. The server reloads automatically as you edit files under `docs/` or `mkdocs.yml`.
80+
81+
To do a one-off build without serving:
3082

3183
```bash
32-
pytest
84+
uv run mkdocs build
3385
```
3486

35-
All tests must pass before a PR will be reviewed. If you are adding a feature, include tests that cover the new behaviour.
87+
The output goes to `site/`. That directory is gitignored and does not need to be committed.
3688

3789
### Code style
3890

0 commit comments

Comments
 (0)