-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
39 lines (31 loc) · 868 Bytes
/
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
PYTHON ?= python
.PHONY: test
test:
pytest -v
.PHONY: autoformat
autoformat:
ruff format .
ruff check . --fix
.PHONY: lint
lint:
$(PYTHON) -m flake8 .
$(PYTHON) -m black . --check
# Note that Bandit will look for .bandit file only if it's invoked with -r option.
$(PYTHON) -m bandit -c pyproject.toml -r . --exit-zero
.PHONY: clean
clean:
@find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
.PHONY: conda-osx-64.lock
conda-osx-64.lock:
CONDA_SUBDIR=osx-64 conda-lock -f conda.yaml -p osx-64
CONDA_SUBDIR=osx-64 conda-lock render -p osx-64
.PHONY: conda-linux-64.lock
conda-linux-64.lock:
conda-lock -f conda.yaml -p linux-64
conda-lock render -p linux-64
conda-lock.yml: conda-osx-64.lock conda-linux-64.lock
# Clear the cache and rebuild the lock.
.PHONY: poetry.lock
poetry.lock:
poetry cache clear --all .
poetry lock