Skip to content

Commit 2a7a415

Browse files
chore: add justfile for contributor workflows
1 parent a233f1a commit 2a7a415

2 files changed

Lines changed: 53 additions & 7 deletions

File tree

CONTRIBUTING.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ How to set up a development environment, add features, and submit changes.
55
## Table of Contents
66

77
- [Development Setup](#development-setup)
8+
- [Task Runner](#task-runner)
89
- [Code Style](#code-style)
910
- [Running Tests](#running-tests)
1011
- [Release Build](#release-build)
@@ -33,6 +34,32 @@ Pre-commit runs automatically on each commit:
3334
- `trailing-whitespace`, `end-of-file-fixer` — file hygiene
3435
- `detect-secrets`, `detect-private-key`, `detect-aws-credentials` — security checks
3536

37+
## Task Runner
38+
39+
Contributor workflows are exposed through `just`:
40+
41+
```bash
42+
just test
43+
just lint
44+
just typecheck
45+
just docs
46+
just build-release
47+
just release-check
48+
```
49+
50+
Install `just` if needed:
51+
52+
```bash
53+
brew install just
54+
```
55+
56+
`just release-check` runs the full local release gate:
57+
- tests
58+
- lint
59+
- typecheck
60+
- strict docs build
61+
- release artifact build
62+
3663
## Code Style
3764

3865
- **Linter/formatter**: [ruff](https://docs.astral.sh/ruff/) (configured in each `pyproject.toml`)
@@ -60,7 +87,7 @@ Key conventions:
6087

6188
```bash
6289
# Run all tests
63-
uv run pytest
90+
just test
6491

6592
# Run with verbose output
6693
uv run pytest -v
@@ -81,10 +108,10 @@ Tests live in:
81108
Use the shared release-build script for local package verification:
82109

83110
```bash
84-
./scripts/build-release.sh
111+
just build-release
85112
```
86113

87-
This script:
114+
This recipe calls `./scripts/build-release.sh`, which:
88115
- deletes old contents from `dist/`
89116
- builds the `studyctl` sdist and wheel with `uv build --package studyctl --no-sources`
90117

@@ -138,6 +165,7 @@ socratic-study-mentor/
138165
│ ├── build-release.sh # Clean dist/ and build release artifacts
139166
│ ├── install.sh # Thin source-install bootstrap wrapper
140167
│ └── install-agents.sh # Thin compatibility wrapper
168+
├── Justfile # Contributor task runner
141169
├── Formula/studyctl.rb # Homebrew formula
142170
├── docs/ # Documentation
143171
├── pyproject.toml # Workspace root
@@ -236,10 +264,7 @@ Agent files are symlinked by the installer, so edits in the repo are immediately
236264
3. Make your changes
237265
4. Run checks:
238266
```bash
239-
uv run ruff check .
240-
uv run ruff format --check .
241-
uv run pyright packages/
242-
uv run pytest
267+
just release-check
243268
```
244269
5. Commit with a descriptive message
245270
6. Open a PR against `main`

Justfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
set shell := ["bash", "-cu"]
2+
3+
default:
4+
@just --list
5+
6+
test:
7+
uv run --group dev pytest
8+
9+
lint:
10+
uv run --group dev ruff check .
11+
12+
typecheck:
13+
uv run --group dev pyright
14+
15+
docs:
16+
uv run --extra docs mkdocs build --strict
17+
18+
build-release:
19+
./scripts/build-release.sh
20+
21+
release-check: test lint typecheck docs build-release

0 commit comments

Comments
 (0)