-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (38 loc) · 1.25 KB
/
Makefile
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
.PHONY: help
help:
@echo "Make targets for mobu"
@echo "make init - Set up dev environment"
@echo "make run - Run development instance of server"
@echo "make update - Update pinned dependencies and run make init"
@echo "make update-deps - Update pinned dependencies"
@echo "make update-deps-no-hashes - Pin dependencies without hashes"
.PHONY: init
init:
pip install --upgrade uv
uv pip install pre-commit tox
uv pip install --editable .
uv pip install -r requirements/main.txt -r requirements/dev.txt
rm -rf .tox
pre-commit install
.PHONY: run
run:
tox run -e run
.PHONY: update
update: update-deps init
.PHONY: update-deps
update-deps:
pip install --upgrade uv
uv pip install pre-commit
pre-commit autoupdate
uv pip compile --upgrade --generate-hashes \
--output-file requirements/main.txt requirements/main.in
uv pip compile --upgrade --generate-hashes \
--output-file requirements/dev.txt requirements/dev.in
# Useful for testing against a Git version of a dependency.
.PHONY: update-deps-no-hashes
update-deps-no-hashes:
pip install --upgrade uv
uv pip compile --upgrade \
--output-file requirements/main.txt requirements/main.in
uv pip compile --upgrade \
--output-file requirements/dev.txt requirements/dev.in