-
Notifications
You must be signed in to change notification settings - Fork 1
/
Justfile
49 lines (40 loc) · 1.25 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
49
# Justfile
python := "python3"
default:
@echo "Available recipes:"
@echo " mypy - Run mypy for type checking"
@echo " pylint - Run pylint for linting"
@echo " test - Run pytest for testing"
@echo " verify - Run mypy, pylint, test"
# Recipe to run mypy for type checking
mypy:
@echo "Running mypy..."
{{python}} -m mypy --check-untyped-defs --ignore-missing-imports python/restate/
{{python}} -m mypy --check-untyped-defs --ignore-missing-imports examples/
# Recipe to run pylint for linting
pylint:
@echo "Running pylint..."
{{python}} -m pylint python/restate --ignore-paths='^.*.?venv.*$'
{{python}} -m pylint examples/ --ignore-paths='^.*\.?venv.*$'
test:
@echo "Running Python tests..."
{{python}} -m pytest tests/*
# Recipe to run both mypy and pylint
verify: mypy pylint test
@echo "Type checking and linting completed successfully."
# Recipe to build the project
build:
@echo "Building the project..."
maturin build --release
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