Skip to content

Commit f023183

Browse files
committed
Add python recipes
1 parent 050da41 commit f023183

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

justfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
11
default:
22
echo 'Hello, world!'
3+
4+
# ---------------------------------------- python ----------------------------------------
5+
6+
# install python dependencies and activate pre-commit hooks
7+
[group('python')]
8+
pip-install: check-venv
9+
pip install -U pip
10+
pip install -e .
11+
pre-commit install
12+
alias i: pip-install
13+
14+
# ensure virtual environment is active
15+
[group('python')]
16+
check-venv:
17+
#!/bin/bash
18+
PYTHON_PATH=$(which python)
19+
if [[ $PYTHON_PATH == *".venv/bin/python" ]]; then
20+
echo "Virtual environment is active."
21+
else
22+
echo "Virtual environment is not active."
23+
exit 1
24+
fi

0 commit comments

Comments
 (0)