-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
48 lines (48 loc) · 1.47 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
alias b := build
alias t := test
version := "1.0.0b1"
pre-push: lint fmt-check test
@echo "All checks passed"
build-only pkg_name:
uv build --package {{pkg_name}}
build:
uv build --package zero-3rdparty
uv build --package model-lib
fix:
uv run ruff check --fix .
fmt-check:
uv run ruff format --check .
fmt:
uv run ruff format .
lint:
uv run ruff check .
type:
uv run pyright
test version='3.11':
uv run --python {{version}} pytest
test-all:
just test 3.10
just test 3.11
just test 3.12
just test 3.13
cov:
export RUN_SLOW=false && uv run pytest --cov --cov-report=html
cov-full format='html':
export RUN_SLOW=true && uv run pytest --cov --cov-report={{format}}
open-cov: cov
open htmlcov/index.html
open-cov-full: cov-full
open htmlcov/index.html
pre-release version=version: build
uv venv -p python3.11 .venv-ci
echo "dist/model_lib-{{version}}-py3-none-any.whl[toml]" > .venv-ci/requirements.txt
uv pip sync --python .venv-ci/bin/python .venv-ci/requirements.txt
uv pip install --python .venv-ci/bin/python -r .venv-ci/requirements.txt
.venv-ci/bin/python scripts/model_lib_pre_release.py
docs command='serve':
uv run scripts/pre_docs.py
uv run mkdocs {{command}}
pkg-version pkg_name command='read': # use m for model-lib and z for zero-3rdparty, bump-{patch,minor,major,alpha,beta,rc} or tag to read the git tag
@uv run scripts/pkg_version.py {{pkg_name}} {{command}}
pkg-find tag_name:
@uv run scripts/pkg_version.py {{tag_name}} decode-tag