-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
59 lines (46 loc) · 1.26 KB
/
Copy pathjustfile
File metadata and controls
59 lines (46 loc) · 1.26 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
schema-name := "schema"
_default:
@just --list
generate-model:
@echo "Generating model"
uv run datamodel-codegen --input {{schema-name}}.json --output src/github_feed/temp_models/{{schema-name}}.py
# run fastapi dev server
run-dev:
uv run fastapi dev src/github_feed/main.py
# run fastapi prod server
run-prod:
uv run fastapi run src/github_feed/main.py
# run fastapi prod server with uvicorn directly
uvicorn:
uv run uvicorn github_feed.main:app --host 0.0.0.0 --port 80
# run the ruff linter
lint:
@echo "Running Ruff linter"
uv run ruff check --fix .
# run the ruff formatter
fmt:
@echo "Running Ruff formatter"
uv run ruff format
# run the ruffer linter and formatter
ruff:
@echo "Running Ruff linter and formatter"
just lint fmt
_start-dmypy:
@echo "Starting dmypy"
-uv run dmypy start
# run mypy type checker
mypy: _start-dmypy
@echo "Running mypy with the mypy daemon dmypy"
uv run dmypy check src/github_feed
# build the docker image
build:
@echo "Building Docker image"
docker build -t github-feed-api .
# run the docker image
run:
@echo "Running Docker image"
docker compose up
# rebuild the docker image
rebuild:
@echo "Rebuilding Docker image"
docker compose up --build -d