You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Set a default value for VECTOR_DB if not already set
22
22
VECTOR_DB ?= milvus
23
23
24
24
.DEFAULT_GOAL := help
25
25
26
-
.PHONY: init-env init check-toml format lint audit test run-services build-app run-app clean all info help api-test install-deps newman-test run-backend run-frontend
26
+
.PHONY: init-env build-frontend build-backend build-tests build-all test api-test newman-test all-test run-app run-backend run-frontend run-services stop-containers clean create-volumes logs info help
27
27
28
+
# Init
28
29
init-env:
29
30
@touch .env
30
31
@echo "PROJECT_NAME=${PROJECT_NAME}">> .env
31
32
@echo "PYTHON_VERSION=${PYTHON_VERSION}">> .env
32
33
@echo "VECTOR_DB=${VECTOR_DB}">> .env
33
34
34
-
install-deps:
35
-
pip install -r requirements.txt
35
+
# Build
36
+
build-frontend:
37
+
$(DOCKER_COMPOSE) build frontend
36
38
37
-
init: init-env install-deps
39
+
build-backend:
40
+
$(DOCKER_COMPOSE) build backend
38
41
39
-
check-toml:
40
-
# No equivalent for pip, so this can be left empty or removed
42
+
build-tests:
43
+
$(DOCKER_COMPOSE) build test
41
44
42
-
format:
43
-
ruff check $(SOURCE_DIR)&& black $(PROJECT_DIRS)&& isort $(PROJECT_DIRS)
45
+
build-all:
46
+
@echo "Building application containers..."
47
+
$(DOCKER_COMPOSE) --profile default --profile test build
$(DOCKER_COMPOSE) run test pytest -v -s -m "not (chromadb or elasticsearch or pinecone or weaviate)"|| { echo"Tests failed";$(MAKE) stop-containers;exit 1; }
48
52
49
-
audit:
50
-
bandit -r $(SOURCE_DIR) -x $(TEST_DIR)
53
+
api-test: build-all run-app
54
+
$(DOCKER_COMPOSE) run test pytest -v -s -m "api and not (chromadb or elasticsearch or pinecone or weaviate)"|| { echo"API Tests failed";$(MAKE) stop-containers;exit 1; }
$(DOCKER_COMPOSE) run test newman run tests/postman/rag_modulo_api_collection.json --env-var "backend_base_url=${REACT_APP_API_URL}"|| { echo"Postman Tests failed";$(MAKE) stop-containers;exit 1; }
$(DOCKER_COMPOSE) run test pytest -v -s -m "not (chromadb or elasticsearch or pinecone or weaviate)"|| { echo"Tests failed";$(MAKE) stop-containers;exit 1; }
61
+
$(DOCKER_COMPOSE) run test newman run tests/postman/rag_modulo_api_collection.json --env-var "backend_base_url=${REACT_APP_API_URL}"|| { echo"Postman Tests failed";$(MAKE) stop-containers;exit 1; }
0 commit comments