-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpython.just
More file actions
71 lines (57 loc) · 2.02 KB
/
python.just
File metadata and controls
71 lines (57 loc) · 2.02 KB
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
62
63
64
65
66
67
68
69
70
71
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
# List available commands by default
default:
@just --list python
# Install all neessary python packages for building / running python code
install:
@echo "Running 'install' for Python code"
uv sync
# Build python code + rust bindings into wheel file
build:
@echo "Running 'build' for py-nominal-streaming"
uv build --package nominal-streaming
# Build python code + rust bindings into local dev mode
dev:
@echo "Running 'dev' for py-nominal-streaming"
uv run maturin develop --manifest-path py-nominal-streaming/Cargo.toml
# Start python repl with package prepared
repl: dev
@echo "Running 'repl' for Python code"
uv run python
# Validate typehints of all python code
check-types:
@echo "Running 'check-types' for Python code"
uv run mypy
# Validate typehints of all python code across all supported python versions
check-types-all:
@echo "Running 'check-types-all' for Python code"
uv run mypy --python-version 3.14
uv run mypy --python-version 3.13
uv run mypy --python-version 3.12
uv run mypy --python-version 3.11
uv run mypy --python-version 3.10
# Validate formatting of all python code
check-format:
@echo "Running 'check-format' for Python code"
uv run ruff format --check
# Validate formatting of all python imports
check-imports:
@echo "Running 'check-imports' for Python code"
uv run ruff check
# Validate formatting and typehints of all python code
check: check-format check-types check-imports
@echo "Running 'check' for Python code"
# Automatically fix formatting of all python imports
fix-imports:
@echo "Running 'fix-imports' for Python code"
uv run ruff check --fix
# Automatically fix formatting of all python code
fix-format:
@echo "Running 'fix-format' for Python code"
uv run ruff format
# Automatically apply all python codestyle fixes
fix: fix-format fix-imports
# Clean any python build artifacts
clean:
@echo "Running 'clean' for Python code"
uv cache clean