-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (39 loc) · 1.38 KB
/
Makefile
File metadata and controls
46 lines (39 loc) · 1.38 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
.PHONY: start start-docker test add-dependency list-dependencies install help
# Default target
help:
@echo "Hamkee FastAPI Development Commands"
@echo "----------------------------------"
@echo "make start - Start the FastAPI server locally"
@echo "make start-docker - Start the FastAPI server using Docker"
@echo "make test - Run all tests"
@echo "make add-dependency DEP=package_name - Add a new Python dependency"
@echo "make list-dependencies - Show all installed Python dependencies"
@echo "make install - Install everything from scratch"
# Start the project locally
start:
@echo "Starting FastAPI server locally..."
PYTHONPATH=`pwd`/app rye run fastapi run app/main.py
# Start the project with Docker
start-docker:
@echo "Starting FastAPI server with Docker..."
docker compose -f docker-compose.yml up
# Run all tests
test:
@echo "Running tests..."
rye run pytest
# Add a new dependency (usage: make add-dependency DEP=package_name)
add-dependency:
@if [ -z "$(DEP)" ]; then \
echo "Error: Please specify a dependency. Example: make add-dependency DEP=requests"; \
exit 1; \
fi
@echo "Adding dependency: $(DEP)..."
rye add $(DEP)
# Show all installed Python dependencies
list-dependencies:
@echo "Listing all dependencies..."
rye list
# Install everything from scratch
install:
@echo "Installing everything from scratch..."
./scripts/devel/install.sh