Cleanup.
This commit is contained in:
parent
71364b2fc0
commit
3dc154ab16
18
Makefile
18
Makefile
@ -1,16 +1,11 @@
|
||||
# Makefile for Adano Project
|
||||
|
||||
# Variables
|
||||
VENV_DIR := .venv
|
||||
ACTIVATE := source $(VENV_DIR)/bin/activate
|
||||
PYTHON := $(VENV_DIR)/bin/python
|
||||
REQUIREMENTS := requirements.txt
|
||||
|
||||
# Default target
|
||||
.PHONY: all
|
||||
all: help
|
||||
|
||||
# Create virtual environment and install dependencies
|
||||
.PHONY: install
|
||||
install:
|
||||
@echo "Setting up virtual environment..."
|
||||
@ -19,31 +14,26 @@ install:
|
||||
$(PYTHON) -m pip install --upgrade pip
|
||||
$(PYTHON) -m pip install -r $(REQUIREMENTS)
|
||||
|
||||
# Run the FastAPI app
|
||||
.PHONY: run
|
||||
run:
|
||||
@echo "Running the FastAPI server..."
|
||||
serve:
|
||||
@echo "Running the server..."
|
||||
$(PYTHON) -m uvicorn main:app
|
||||
|
||||
# Run tests (assuming you have tests set up)
|
||||
.PHONY: test
|
||||
test:
|
||||
@echo "Running tests..."
|
||||
# Add your test command here, e.g., pytest
|
||||
pytest
|
||||
$(PYTHON) -m pytest
|
||||
|
||||
# Clean up virtual environment and __pycache__
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@echo "Cleaning up..."
|
||||
rm -rf $(VENV_DIR)
|
||||
find . -type d -name "__pycache__" -exec rm -rf {} +
|
||||
|
||||
# Help message
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "Makefile targets:"
|
||||
@echo " install - Create virtual environment and install dependencies"
|
||||
@echo " run - Run the FastAPI server"
|
||||
@echo " serve - Run server"
|
||||
@echo " test - Run tests"
|
||||
@echo " clean - Remove virtual environment and cache files"
|
||||
|
@ -2,3 +2,7 @@ python-multipart
|
||||
fastapi
|
||||
dataset
|
||||
uvicorn
|
||||
anyio
|
||||
pytest-asyncio
|
||||
httpx
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user