-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathJustfile
More file actions
63 lines (49 loc) · 1.49 KB
/
Justfile
File metadata and controls
63 lines (49 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
59
60
61
62
63
set dotenv-load
_list:
@just --list --unsorted
# Run the application stack with (`cli`, `api`) entrypoint with `args`
run entrypoint *args:
@docker compose run --rm rag {{entrypoint}} {{args}}
# Start compose containers in the background
scaffold:
@echo "Scaffolding infrastructure..."
@docker compose --profile infra up -d
# Remove compose containers from the background
teardown:
@echo "Tearing down infrastructure..."
@docker compose down
# Lint and format with **Ruff**
tidy:
@echo "Linting..."
@uv run ruff check --fix
@echo "\nFormatting..."
@uv run ruff format
# Type check with **Mypy**
type-check:
@echo "Type checking..."
@uv run mypy src/
# Run (`e2e`, `integration`, `unit`) tests; If none specified, run all tests
test tests="":
@echo "Testing..."
@uv run pytest tests/{{tests}} --cov=src/ --cov-report term-missing
# Run CI checks locally (`tidy` -> `type-check` -> `test`)
ci:
@just tidy
@echo
@just type-check
@echo
@just test
# Generate dependency graph with **Pydeps**
graph:
@echo "Creating dependency graph..."
@uv run pydeps src/rag/ -o dependency-graph.svg
# Start data ingestion pipeline with **Marimo**
create-collection:
@uvx marimo edit --sandbox infra/qdrant/create_collection.py
# `build` or `run` the project container with `args`
container cmd *args:
@just _container-{{cmd}} {{args}}
_container-build *args:
@docker build -t rag-container:latest {{args}} .
_container-run *args:
@docker run --rm -it rag-container:latest {{args}}