-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathjustfile
55 lines (44 loc) · 1.72 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
50
51
52
53
54
55
# List all available commands
default:
just --list
# install dev requirements
install_requirements_dev:
pip install -r requirements-dev.txt
# install litgen in editable mode
install_litgen_editable:
pip install --verbose -e .
# run black formatter
black:
black .
# Builds the integration tests for pybind
build_integration_tests_pybind:
python src/litgen/integration_tests/autogenerate_mylib.py no_generate_file_by_file pybind
export LITGEN_USE_NANOBIND=OFF && cd src/litgen/integration_tests && pip install -v -e . && cd -
python -m lg_mylib.use pybind
python -c "import lg_mylib._lg_mylib_pybind"
# Builds the integration tests for nanobind
build_integration_tests_nanobind:
python src/litgen/integration_tests/autogenerate_mylib.py no_generate_file_by_file nanobind
export LITGEN_USE_NANOBIND=ON && cd src/litgen/integration_tests && pip install -v -e . && cd -
python -m lg_mylib.use nanobind
python -c "import lg_mylib._lg_mylib_nanobind"
# Runs all tests for pybind, after building the integration tests
integration_tests_pybind: build_integration_tests_pybind
just pytest pybind
# Runs all tests for nanobind, after building the integration tests
integration_tests_nanobind: build_integration_tests_nanobind
just pytest nanobind
# Runs all tests for pybind and nanobind (after building the integration tests)
integration_tests:
just integration_tests_pybind
just integration_tests_nanobind
# Just runs pytest (requires that the integration tests have been built)
pytest binding_type:
python -m lg_mylib.use {{binding_type}}
pytest
# Runs mypy on the top level folder (see mypy.ini)
mypy:
mypy .
# Build documentation
docs:
./litgen-book/generate_litgen_book.sh