File size: 1,279 Bytes
733b6a1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6491ed1
 
 
 
 
 
 
 
733b6a1
 
 
 
 
 
 
 
 
 
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
60
61
62
-include .env
export

.PHONY: start
start:
	@uv run app.py

.PHONY: test
test:
	@uv run pytest tests/ -v

.PHONY: test/coverage
test/coverage:
	@uv run pytest --cov=alien_obfuscator --cov-report=term-missing tests/ -v

.PHONY: test/report
test/report:
	@uv run pytest --cov=alien_obfuscator --cov-report=html tests/ -v

.PHONY: lint
lint:
	@uv run ruff check

.PHONY: lint/fix
lint/fix:
	@uv run ruff format

.PHONY: ty
ty:
	@uv run ty check

.PHONY: req/generate
req/generate:
	@uv pip compile pyproject.toml -o requirements.txt

.PHONY: modal/run
modal/run:
	@uv run modal run src/alien_obfuscator/modal_serve.py

.PHONY: modal/deploy
modal/deploy:
	@uv run modal deploy src/alien_obfuscator/modal_serve.py

.PHONY: modal/stop
modal/stop:
	@uv run modal app stop modal-gemma

.PHONY: modal/logs
modal/logs:
	@uv run modal app logs modal-gemma 20

.PHONY: deploy/hf
deploy/hf:
	hf upload build-small-hackathon/alien-riddle ./ --type space \
		--exclude ".git/*" --exclude ".gitignore" \
		--exclude ".venv/*" --exclude ".env" --exclude ".env.example" \
		--exclude "__pycache__/*" --exclude "*.pyc" \
		--exclude ".pytest_cache/*" --exclude ".ruff_cache/*" \
		--exclude ".mypy_cache/*" --exclude ".coverage*" \
		--exclude "htmlcov/*" \
		--commit-message="deploy from GitHub"