-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
45 lines (33 loc) · 973 Bytes
/
Copy pathmakefile
File metadata and controls
45 lines (33 loc) · 973 Bytes
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
CLI_NAME := "oss4climate_scripts.cli"
.PHONY: install
install:
uv sync --all-groups
.PHONY: build
build:
uv lock
.PHONY: code_cleanup
code_cleanup:
uv tool run pre-commit install
uv tool run pre-commit run --all
.PHONY: run_app
run_app:
uv run gunicorn -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 app:app
.PHONY: test
test:
uv run pytest src/.
.PHONY: test_with_coverage
test_with_coverage:
uv run coverage run -m pytest src/test/.
uv run coverage html --omit=src/test/* --omit=notebooks/*
echo "Exposing on http://localhost:9001/"
uv run python -m http.server 9001 --directory htmlcov/
# CLI entries
.PHONY: seed_typesense
seed_typesense:
uv run src/oss4climate_app/seed_typesense.py
# ----------------------------------------------------------------------------
# Kept for legacy reasons (backwards compatibility)
# ----------------------------------------------------------------------------
.PHONY: check_code
check_code:
make code_cleanup