-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
48 lines (37 loc) · 1.01 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
# just manual: https://github.com/casey/just#readme
_default:
just --list
# Install dependencies used by this project
bootstrap default="3.12":
uv venv --python {{default}}
just sync
# Sync dependencies with environment
sync:
uv sync
# Build the project as a package (uv build)
build *args:
uv build
# Run the code formatter
format:
uv run ruff format tokamak tests
# Run code quality checks
check:
#!/bin/bash -eux
uv run ruff check tokamak tests
# Run mypy checks
check-types:
#!/bin/bash -eux
uv run mypy tokamak
# Run all tests locally
test *args:
#!/bin/bash -eux
uv run pytest {{args}}
# Run the project tests for CI environment (e.g. with code coverage)
ci-test coverage_dir='./coverage':
uv run pytest --cov=tokamak --cov-report xml --junitxml=./coverage/unittest.junit.xml
# Run an example
example name:
uv run --extra examples python examples/{{name}}.py
# Run the benchmark
benchmark:
uv run --extra benchmarks python -m benchmark.compare_werkzeug