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