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
Copy file name to clipboardExpand all lines: AGENTS.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@
4
4
5
5
This file guides coding agents working in this repository. Keep it operational and project-specific. Use `README.md` for package usage and `docs/developer.md` for local setup details; do not duplicate those walkthroughs here.
6
6
7
+
## Workflow Tools
8
+
9
+
- Use `uv` for contributor and agent workflows by default.
10
+
- Use `uv sync` to create or refresh the local environment.
11
+
- Use `uv run ...` for project commands instead of bare `python`, `pip`, or globally installed tooling unless the task explicitly requires it.
12
+
7
13
## Repo Map
8
14
9
15
-`wagtail_honeypot/`: package behavior and public implementation.
@@ -37,7 +43,8 @@ This file guides coding agents working in this repository. Keep it operational a
37
43
- For template tag or rendered field changes, update `tests/test_tags.py` with context and rendered HTML assertions.
38
44
- Use `tests/testapp/` coverage when the change affects Wagtail page behavior or end-to-end form flow.
39
45
- For translation or configuration changes, add focused assertions where practical.
40
-
- Run `make test` for the default suite. Use `tox --skip-missing-interpreters` or `make tox` only when matrix coverage is relevant to the task.
46
+
- Run `make test` or `uv run coverage run manage.py test` for the default suite.
47
+
- Use `make tox` or `uv run tox --skip-missing-interpreters` only when matrix coverage is relevant to the task.
Copy file name to clipboardExpand all lines: docs/developer.md
+56-5Lines changed: 56 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,36 +2,87 @@
2
2
3
3
## Development Setup
4
4
5
-
With a virtual environment activated, install the package in editable mode:
5
+
Install [`uv`](https://docs.astral.sh/uv/) and use it as the default workflow for this project.
6
+
7
+
Pin or install the default contributor Python version:
8
+
9
+
```bash
10
+
uv python install 3.12
11
+
```
12
+
13
+
Create and sync the project environment:
6
14
7
15
```bash
8
-
pip install -e ".[development]"
16
+
uv sync
9
17
```
10
18
19
+
The default synced environment is intended to track the latest tested local stack for this repo: Python 3.12 with Django 5.2 and Wagtail 7.2. Use `tox` for the broader compatibility matrix.
20
+
11
21
There is a [testapp](../tests/testapp/) provided that is a fully configured minimal setup using Wagtail v5.1+
12
22
13
23
Setup the app:
14
24
15
25
```bash
16
-
make migrate
26
+
uv run python manage.py migrate
17
27
```
18
28
19
29
Optional:
20
30
31
+
```bash
32
+
uv run python manage.py createsuperuser
33
+
```
34
+
35
+
Or use:
36
+
21
37
```bash
22
38
make superuser
23
39
```
24
40
25
-
This add an admin account with login details of Username: `admin` Password: `changeme`
41
+
This adds an admin account with login details of Username: `admin` Password: `changeme`
26
42
27
43
Run the development server:
28
44
29
45
```bash
30
-
make run
46
+
uv run python manage.py runserver 0:8000
31
47
```
32
48
33
49
View the site at `http://localhost:8000` or add `/admin` to login.
34
50
51
+
The `Makefile` targets also run through `uv`, so `make sync`, `make migrate`, `make run`, `make test`, and `make tox` remain valid shortcuts.
52
+
53
+
## Common commands
54
+
55
+
Run the default test suite:
56
+
57
+
```bash
58
+
uv run coverage run manage.py test
59
+
uv run coverage report
60
+
```
61
+
62
+
Run the compatibility matrix:
63
+
64
+
```bash
65
+
uv run tox --skip-missing-interpreters
66
+
```
67
+
68
+
Run the configured formatting and lint hooks:
69
+
70
+
```bash
71
+
uv run pre-commit run --all-files
72
+
```
73
+
74
+
## Dependency management
75
+
76
+
Use `uv` to change contributor dependencies and keep the lockfile in sync:
77
+
78
+
```bash
79
+
uv add --dev <package>
80
+
uv lock
81
+
uv sync
82
+
```
83
+
84
+
If you edit `pyproject.toml` manually, regenerate `uv.lock` and resync the environment before committing.
0 commit comments