1
+
2
+ # Generate project using defaults
3
+ bake BAKE_OPTIONS = " --no-input":
4
+ cookiecutter {{ BAKE_OPTIONS}} . --overwrite-if -exists
5
+
6
+ # Watch for changes
7
+ watch BAKE_OPTIONS = " --no-input": bake
8
+ watchmedo shell -command \
9
+ - p ' *.*' \
10
+ - c ' just bake {{ BAKE_OPTIONS}} ' \
11
+ - W -R -D {{ ' {{cookiecutter.project_slug}} ' }}
12
+
13
+ # replay: BAKE_OPTIONS="--replay"
14
+ # replay: watch
15
+ # ;
16
+
17
+
18
+ # Run all the tests, but allow for arguments to be passed
19
+ test *ARGS:
20
+ @echo "Running with arg: {{ ARGS}} "
21
+ uv run --python=3.13 --extra dev pytest {{ ARGS}}
22
+
23
+ # Run all the tests, but on failure, drop into the debugger
24
+ pdb *ARGS:
25
+ @echo "Running with arg: {{ ARGS}} "
26
+ uv run --python=3.13 --with pytest --with httpx pytest --pdb --maxfail=10 --pdbcls=IPython.terminal.debugger:TerminalPdb {{ ARGS}}
27
+
28
+
29
+
30
+ # Build the project, useful for checking that packaging is correct
31
+ build:
32
+ rm -rf build
33
+ rm -rf dist
34
+ uv build
35
+
36
+ VERSION := `grep -m1 ' ^version' pyproject.toml | sed -E ' s/ version = " (.*)"/ \1 / ' `
37
+
38
+ # Print the current version of the project
39
+ version:
40
+ @echo "Current version is {{ VERSION}} "
41
+
42
+ # Tag the current version in git and put to github
43
+ tag:
44
+ echo "Tagging version v{{ VERSION}} "
45
+ git tag -a v{{ VERSION}} -m "Creating version v{{ VERSION}} "
46
+ git push origin v{{ VERSION}}
47
+
48
+ # Run all the formatting, linting, and testing commands
49
+ clean:
50
+ ruff format .
51
+ ruff check . --fix
52
+ ruff check --select I --fix .
53
+ pytest
0 commit comments