-
Notifications
You must be signed in to change notification settings - Fork 9
/
justfile
44 lines (34 loc) · 923 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
_default:
just --list
# error out if this isn't being run in a venv
_require-venv:
#!/usr/bin/env python
import sys
sys.exit(sys.prefix == sys.base_prefix)
# run test suite against multiple python versions
@tox:
tox run-parallel
@lint:
ruff .
black --check --quiet .
# lint&fix files, useful for a pre-commit hook
@lint-fix:
ruff . --fix
black --quiet .
@typecheck:
pyright -p pyproject.toml
# perform all checks, but don't change any files
@validate: tox lint typecheck
@local: _require-venv validate
# run the full ci pipeline
ci: && validate
pip install .[test,ci]
# useful for reinstalling after changing dependencies
@reinstall: _require-venv
pip install -e .[test,ci]
@release: _require-venv validate
rm -rf dist
pip install -e .[release]
python -m build
# give upload api key at runtime
python -m twine upload --username __token__ dist/*