You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 67b4bdc
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+27-35Lines changed: 27 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ This is a **Python project template** that provides a pre-configured, production
17
17
-**Documentation** via [MkDocs](https://www.mkdocs.org) with [mkdocstrings](https://mkdocstrings.github.io), auto-deployed to GitHub Pages
18
18
-**CI/CD** via GitHub Actions
19
19
-**Containerisation** via Docker and Dev Containers
20
+
-**Environment & Task Management** via [mise](https://mise.jdx.dev)
20
21
21
22
---
22
23
@@ -30,71 +31,62 @@ This is a **Python project template** that provides a pre-configured, production
30
31
│ ├── README.md # Project README and MkDocs home page
31
32
│ ├── CONTRIBUTING.md # Contributing guidelines
32
33
│ └── reference/ # Auto-generated API reference pages
33
-
├── project/ # Main source package (renamed via `make project`)
34
+
├── project/ # Main source package (renamed via `mise run project`)
34
35
│ ├── __init__.py
35
36
│ └── app.py # CLI entry point
36
37
├── tests/ # Test suite
37
38
│ ├── conftest.py # Shared pytest fixtures and hooks
38
39
│ └── test_app.py # Sample tests
39
40
├── compose.yml # Docker Compose file
40
41
├── Dockerfile # App container
41
-
├── Makefile# Workflow automation targets
42
+
├── mise.toml # Workflow automation tasks
42
43
├── mkdocs.yml # MkDocs configuration
43
44
├── pyproject.toml # Project metadata, dependencies, and tool configuration
44
45
└── uv.lock # Locked dependency versions (do not edit manually)
45
46
```
46
47
47
-
> **Note:** The `project/` folder is the template placeholder. After initialising a real project with `make project NAME=...`, it is renamed to the chosen package name.
48
+
> **Note:** The `project/` folder is the template placeholder. After initialising a real project with `mise run project name=...`, it is renamed to the chosen package name.
48
49
49
50
---
50
51
51
52
## Setup
52
53
53
54
### Prerequisites
54
55
55
-
- Python 3.12+
56
-
-[pipx](https://pipx.pypa.io) (to install uv)
56
+
-[mise](https://mise.jdx.dev)
57
57
- Docker (for Dev Container or containerised runs)
58
58
59
59
### First-time setup
60
60
61
61
```bash
62
-
# 1. Install uv (if not already installed)
63
-
make uv
64
-
65
-
# 2. Install all dependencies
66
-
make install
67
-
68
-
# 3. Install pre-commit hooks
69
-
make precommit
70
-
71
-
# 4. Activate the virtual environment
72
-
make venv
62
+
# Install tools, project dependencies, and pre-commit hooks
63
+
mise run dev
73
64
```
74
65
75
66
### Rename the template for a new project (run once)
76
67
77
68
```bash
78
-
make project NAME="my-project"DESCRIPTION="My app"AUTHOR="Your Name"EMAIL="you@example.com"GITHUB="your-username"
69
+
mise run project --name "my-project"--description "My app"--author "Your Name"--email "you@example.com"--github "your-username"
79
70
```
80
71
81
72
---
82
73
83
74
## Common Commands
84
75
85
-
| Task | Command |
86
-
|---|---|
87
-
| Install dependencies |`make install`|
88
-
| Update dependencies |`make update`|
89
-
| Lint and format |`make lint`|
90
-
| Run tests with coverage |`make test`|
91
-
| Run app locally |`app` (after `make venv`) or `uv run app`|
92
-
| Run app in Docker |`docker compose run app`|
93
-
| Serve docs locally |`make local`|
94
-
| Deploy docs to GitHub Pages |`make docs`|
95
-
| Full setup from scratch |`make all`|
96
-
97
-
> Refer to `docs/README.md` for the full list of available targets. Add new targets to `Makefile` as needed.
76
+
| Task | Command | Alias |
77
+
|---|---|---|
78
+
| Install dependencies |`mise run install`|`i`|
79
+
| Update dependencies |`mise run update`|`u`|
80
+
| Lint and format |`mise run lint`|`l`|
81
+
| Run tests with coverage |`mise run test`|`t`|
82
+
| Run app locally |`mise run app`|`a`|
83
+
| Run app in Docker |`docker compose run app`||
84
+
| Serve docs locally |`mise run local-docs`|`d`|
85
+
| Deploy docs to GitHub Pages |`mise run docs`||
86
+
| Setup dev environment |`mise run dev`||
87
+
| Full setup from scratch |`mise run all`||
88
+
89
+
> Refer to `docs/README.md` for the full list of available targets. Add new targets to `mise.toml` as needed.
- Use `pytest` monkeypatch and `pytest-mock` for mocking instead of `unittest.MagicMock`
141
133
- Do not cheat! Never modify source code just to make a failing test pass. Fix real bugs in source code and fix incorrect assertions in tests
142
134
143
-
## Make Targets
135
+
## Mise Tasks
144
136
145
-
Use `make` targets for all common workflows: lint, test, run locally, and deploy. Refer to `docs/README.md` for currently available targets. Add new targets to `Makefile` as needed.
137
+
Use `mise` tasks for all common workflows: lint, test, run locally, and deploy. Refer to `docs/README.md` for currently available tasks. Add new tasks to `mise.toml` as needed.
146
138
147
139
## Notes
148
140
149
141
- Python 3.12+ required
150
142
- Dependencies are managed via `pyproject.toml` and locked in `uv.lock`
151
-
- Do not edit `uv.lock` directly; use `make update` to update dependencies
143
+
- Do not edit `uv.lock` directly; use `mise run update` to update dependencies
0 commit comments