This repository was archived by the owner on Jan 8, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (34 loc) · 1.48 KB
/
Makefile
File metadata and controls
47 lines (34 loc) · 1.48 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
.DEFAULT_GOAL := help
.PHONY: help
help:
@grep -E '^[\.a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: test
test: ## Run tests
pytest tyche -v --cov=tyche --cov-report term-missing:skip-covered
.PHONY: check
check: black-check pip-check test
.PHONY: black-check
black-check: ## Check code formatting
python -m black --check tyche
.PHONY: black
black: ## Format code
python -m black tyche
.PHONY: pip-sync
pip-sync: ## Install all dev dependencies
python -m pip install "$$(grep '^pip-tools=' requirements-dev.txt)"
python -m piptools sync requirements-dev.txt
.PHONY: develop
develop: pip-sync pip-check ## Setup repository for development
.PHONY: pip-check
pip-check: ## Verify that all python package dependencies are met
python -m pip check
# Sets the annotation content for the files generated by pip-compile
export CUSTOM_COMPILE_COMMAND := make update-requirements
.PHONY: update-requirements
update-requirements: ## Regenerate requirements.txt with newest versions of dependencies
python -m piptools compile --rebuild --upgrade --quiet requirements.in
python -m piptools compile --rebuild --upgrade --quiet requirements-dev.in
.PHONY: upgrade
upgrade: ## Update all packages as available
python -m pip install --upgrade-strategy eager --upgrade $$(cat requirements.in | sed -n 's/==.*$$//p')
python -m pip install --upgrade-strategy eager --upgrade $$(cat requirements-dev.in | sed -n 's/==.*$$//p')