-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (32 loc) · 1.34 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
44
45
46
# Conda-related paths
conda_env_dir ?= ./env
# Command aliases
CONDA_EXE ?= conda
CONDA_RUN := $(CONDA_EXE) run --prefix $(conda_env_dir) --no-capture-output
help: ## Display help on all Makefile targets
@@grep -h '^[a-zA-Z]' $(MAKEFILE_LIST) | awk -F ':.*?## ' 'NF==2 {printf " %-20s%s\n", $$1, $$2}' | sort
setup: ## Setup local dev conda environment
$(CONDA_EXE) env $(shell [ -d $(conda_env_dir) ] && echo update || echo create) -p $(conda_env_dir) --file etc/dev-environment.yml
run: ## Run the application from the dev environment
$(CONDA_RUN) python -m conda_tui
dev: ## Run the application in dev mode
$(CONDA_RUN) textual run --dev -c conda tui
log: ## Run the log tailer (run in another terminal)
$(CONDA_RUN) textual console
type-check: ## Run static type checks
$(CONDA_RUN) mypy
test: ## Run all the unit tests
$(CONDA_RUN) pytest
tox: ## Run tox to test in isolated environments
$(CONDA_RUN) tox
docs: ## Generate the HTML docs
$(MAKE) -C docs html
docs-dev: ## Generate the HTML docs in live mode for development
$(MAKE) -C docs live
clean: ## Clean up cache and temporary files
find . -name \*.py[cod] -delete
rm -rf .pytest_cache .mypy_cache .tox build dist
clean-all: clean ## Clean up, including build files and conda environment
find . -name \*.egg-info -delete
rm -rf $(conda_env_dir)
.PHONY: $(MAKECMDGOALS)