-
Notifications
You must be signed in to change notification settings - Fork 61
/
justfile
61 lines (48 loc) · 1.54 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
55
56
57
58
59
60
61
PIP := "uv pip"
PACKAGES := "lenskit lenskit-funksvd lenskit-implicit lenskit-hpf"
python := "3.11"
conda_env := "lkpy"
DENO := "deno run --allow-read=. --allow-write=.github/workflows --allow-net=jsr.io"
# list the tasks in this project (default)
list-tasks:
just --list
# clean up build artifacts
clean:
rm -rf build dist *.egg-info */dist */build
git clean -xf docs
# build the modules and wheels
build:
for pkg in {{PACKAGES}}; do python -m build -n -o dist $pkg; done
build-sdist:
for pkg in {{PACKAGES}}; do python -m build -n -s -o dist $pkg; done
# install the package
[confirm("this installs package from a wheel, continue [y/N]?")]
install:
{{PIP}} install {{PACKAGES}}
# install the package (editable)
install-editable:
{{PIP}} install {{ prepend('-e ', PACKAGES) }}
# run tests with default configuration
test:
python -m pytest
# run fast tests
test-fast:
python -m pytest -m 'not slow'
# run tests matching a keyword query
test-matching query:
python -m pytest -k "{{query}}"
# build documentation
docs:
sphinx-build docs build/doc
# preview documentation with live rebuild
preview-docs:
sphinx-autobuild --watch lenskit/lenskit docs build/doc
# update source file headers
update-headers:
unbehead
# update GH workflows
update-workflows:
deno check workflows/*.ts
{{DENO}} workflows/render.ts --github -o .github/workflows/test.yml workflows/test.ts
{{DENO}} workflows/render.ts --github -o .github/workflows/docs.yml workflows/docs.ts
-pre-commit run --files .github/workflows/*.yml