-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathJustfile
More file actions
58 lines (44 loc) · 1.49 KB
/
Justfile
File metadata and controls
58 lines (44 loc) · 1.49 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
# Use UV_PYTHON env variable to select either a python version or
# the complete python to your python interpreter
default := "all"
set shell := ["bash", "-c"]
sync:
uv sync --all-extras --all-packages
format:
uv run ruff format
uv run ruff check --fix --fix-only
lint:
uv run ruff format --check
uv run ruff check
typecheck-pyright:
PYRIGHT_PYTHON_IGNORE_WARNINGS=1 uv run pyright python/
PYRIGHT_PYTHON_IGNORE_WARNINGS=1 uv run pyright examples/
PYRIGHT_PYTHON_IGNORE_WARNINGS=1 uv run pyright tests
PYRIGHT_PYTHON_IGNORE_WARNINGS=1 uv run pyright test-services/
typecheck-mypy:
uv run -m mypy --check-untyped-defs --ignore-missing-imports --implicit-optional python/
uv run -m mypy --check-untyped-defs --ignore-missing-imports --implicit-optional examples/
uv run -m mypy --check-untyped-defs --ignore-missing-imports --implicit-optional tests/
typecheck: typecheck-pyright typecheck-mypy
test:
uv run -m pytest tests/*
# Recipe to run both mypy and pylint
verify: format lint typecheck test
@echo "Type checking and linting completed successfully."
# Recipe to build the project
build:
@echo "Building the project..."
#maturin build --release
uv build --all-packages
clean:
@echo "Cleaning the project"
cargo clean
example:
#!/usr/bin/env bash
cd examples/
if [ -z "$PYTHONPATH" ]; then
export PYTHONPATH="examples/"
else
export PYTHONPATH="$PYTHONPATH:examples/"
fi
hypercorn --config hypercorn-config.toml example:app