-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (53 loc) · 1.52 KB
/
Makefile
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
lint_check:
# Lint the code
uv run ruff check --fix
format_check:
# Reformat using black in check mode
uv run ruff format --check
format:
# Reformat using black
uv run ruff format
# Make sure you install the docs requirements first
# In the project directory (../rex) run `uv pip install -r docs/requirements.txt`
build_docs:
# Build the documentation
# JUPYTER_PLATFORM_DIRS=1 uv run mkdocs build --strict # https://github.com/danielfrg/mkdocs-jupyter/issues/154
uv run mkdocs build --strict # Add -v for verbose output
serve_docs:
# Serve the documentation
#JUPYTER_PLATFORM_DIRS=1 uv run mkdocs serve # https://github.com/danielfrg/mkdocs-jupyter/issues/154
uv run mkdocs serve
run_tests:
# Run tests
uv run pytest tests \
--cov=rex \
--cov-report=html \
--cov-report=xml \
--cov-report=term \
--cov-config=pyproject.toml \
-v --color=yes
run_integration_tests:
# Run tests
uv run pytest tests/integration
run_unit_tests:
# Run tests
uv run pytest tests \
--ignore tests/integration \
--cov=rex \
--cov-report=html \
--cov-report=xml \
--cov-report=term \
--cov-config=pyproject.toml \
-v --color=yes
TEST_FILE ?= tests/unit/test_jax_utils.py
run_test:
# Run specific test
uv run pytest $(TEST_FILE) \
--ignore tests/integration \
--cov=rex \
--cov-report=html \
--cov-report=xml \
--cov-report=term \
--cov-config=pyproject.toml \
-v --color=yes
.PHONY: lint_check format_check format build_docs serve_docs run_tests run_integration_tests run_unit_tests run_test