-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 883 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (27 loc) · 883 Bytes
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
.PHONY: create-env
create-env:
@echo "\n=== Creating conda virtual environment (using mamba) ==="
mamba env create -f environment.yaml
# syncs with environment.yaml - does not update existing environment even if it is outdated
.PHONY: update-env
update-env:
@echo "\n=== Updating conda virtual environment (using mamba) ==="
mamba env update -f environment.yaml
.PHONY: formatter
formatter:
@echo "\n=== Checking code formatting ==="
@black --check .
.PHONY: linter
linter:
@echo "\n=== Linting Python files (all) ==="
@pylint $(shell git ls-files '*.py')
MYPY_OPTS = --install-types --non-interactive --explicit-package-bases --config-file=pyproject.toml --show-error-codes
.PHONY: type-check
type-check:
@echo "\n=== Running type checks (all) ==="
@mypy $(MYPY_OPTS) .
.PHONY: code-quality
code-quality:
-@$(MAKE) formatter
-@$(MAKE) type-check
-@$(MAKE) linter