-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
50 lines (37 loc) · 959 Bytes
/
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
set positional-arguments
PYTHON_DIR := if os_family() == "windows" { "./.venv/Scripts" } else { "./.venv/bin" }
PYTHON := PYTHON_DIR + if os_family() == "windows" { "/python.exe" } else { "/python3" }
SYSTEM_PYTHON := if os_family() == "windows" { "py.exe -3" } else { "python3" }
create-venv:
{{SYSTEM_PYTHON}} -m venv .venv
install:
{{PYTHON}} -m pip install -e ".[dev]"
run *ARGS:
{{PYTHON}} -m dokyu {{ARGS}}
test:
{{PYTHON}} -m pytest
just clean
snapshot:
{{PYTHON}} -m pytest --snapshot-update
build:
{{PYTHON}} -m build
release version:
@echo 'Tagging {{version}}...'
git tag {{version}}
@echo 'Push to GitHub to trigger publish process...'
git push --tags
clean:
rm -rf tmp/
rm -rf .pytest_cache/
clean-builds:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
lint:
{{PYTHON}} -m pyright src tests
{{PYTHON}} -m ruff check .
fmt:
{{PYTHON}} -m ruff format .
ci-test:
{{PYTHON}} -m pytest
just clean