-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 1.87 KB
/
Copy pathMakefile
File metadata and controls
53 lines (40 loc) · 1.87 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
46
47
48
49
50
51
52
53
POETRY ?= poetry
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show this help message
@awk 'BEGIN {FS = ":.*## "; printf "Usage: make \033[36m<target>\033[0m\n"} \
/^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5); next } \
/^[a-zA-Z0-9_.-]+:.*## / { printf " \033[36m%-22s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
.PHONY: check.lock
check.lock:
@$(POETRY) check --lock
##@ Install
.PHONY: install
install: check.lock ## Install the package with its runtime dependencies
@$(POETRY) install
.PHONY: install.dev
install.dev: check.lock ## Install with the dev dependency group
@$(POETRY) install --with dev
.PHONY: install.dev.only
install.dev.only: check.lock ## Install only the dev dependency group
@$(POETRY) install --only dev
.PHONY: install.doc
install.doc: check.lock ## Install only the docs dependency group
@$(POETRY) install --only docs
##@ Test
COV ?= --cov=clinicadl --cov-report=xml --cov-report=term
.PHONY: unit-tests
unit-tests: install.dev ## Run unit tests (CPU only)
@$(POETRY) run python -m pytest -v $(COV) -m "not gpu and not multi_gpu" tests/unittests
.PHONY: gpu-unit-tests
gpu-unit-tests: install.dev ## Run unit tests on a single GPU
@$(POETRY) run python -m pytest -v $(COV) -m "gpu" tests/unittests
.PHONY: multi-gpu-unit-tests
multi-gpu-unit-tests: install.dev ## Run unit tests on multiple GPUs
@$(POETRY) run python -m pytest -v $(COV) -m "multi_gpu" tests/unittests
.PHONY: functional-tests
functional-tests: install.dev ## Run functional tests (CPU only)
@$(POETRY) run python -m pytest -v $(COV) -m "not gpu and not multi_gpu" --ref /localdrive10TB/users/clinicadl.ci/clinicadl_data_ci/data_ci tests/functional
.PHONY: gpu-functional-tests
gpu-functional-tests: install.dev ## Run functional tests on a single GPU
@$(POETRY) run python -m pytest -v $(COV) -m "gpu" --ref /localdrive10TB/users/clinicadl.ci/clinicadl_data_ci/data_ci tests/functional