-
Notifications
You must be signed in to change notification settings - Fork 2
/
justfile
54 lines (44 loc) · 1.36 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# list available recipes
list:
@just --list --justfile {{justfile()}}
# remove pre-built rust and python libraries (excluding .venv)
clean:
rm -rf .pytest_cache
rm -rf build
rm -rf test/assets/build
rm -rf dist
rm -rf wheelhouse
rm -rf .ruff_cache
find . -depth -type d -not -path "./.venv/*" -name "__pycache__" -exec rm -rf "{}" \;
find . -depth -type d -path "*.egg-info" -exec rm -rf "{}" \;
find . -type f -name "*.egg" -delete
find . -type f -name "*.so" -delete
# clean out coverage files
clean-cov:
rm -rf pycov
# clean, remove existing .venv and rebuild the venv with pip install -e .[dev]
reset: clean clean-cov && (install ".venv/bin/")
rm -rf .venv
python -m venv .venv
# install the project and required dependecies for development & testing
install venvpath="":
{{venvpath}}python -m pip install --upgrade pip
{{venvpath}}pip install -e .[dev]
{{venvpath}}pip install tests/assets
# lint python with ruff
lint:
- .venv/bin/ruff check .
# test python
test:
- .venv/bin/pytest
# lint and test python
check: lint test
#run coverage analysis on python code
cov:
pytest --cov --cov-report html:pycov --cov-report term
# serve python coverage results on localhost:8000 (doesn't run coverage analysis)
show-cov:
python -m http.server -d ./pycov
# serve python docs on localhost:8000
docs:
mkdocs serve