Skip to content

Commit 7d5b04a

Browse files
authored
feat: 🧑‍💻 add recipe add-function (#2)
## Description I'm not sure that this is the best way to go about it - and as we, @lwjohnst86 , talked about we might want to make a tool for tasks like this at some point. But maybe this is fine for now? At least I find this helpful - instead of having to create the function file and corresponding test file by hand. With this, the command `just add-function sprout core hello` creates `sprout/core/hello.py` and the corresponding test file `tests/core/test_hello.py` ## Reviewer Focus <!-- Select quick/in-depth as necessary --> This PR needs a quick review.
1 parent 6f161a2 commit 7d5b04a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

justfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,8 @@ reset-local:
5757
# Build the documentation website using Quarto
5858
build-website:
5959
docker run --rm -v $(pwd):/site -w /site ghcr.io/quarto-dev/quarto:latest quarto render
60+
61+
# Add files for a new function (function file and test file)
62+
add-function app part name:
63+
touch ./{{app}}/{{part}}/{{name}}.py
64+
touch ./tests/{{part}}/test_{{name}}.py

0 commit comments

Comments
 (0)