-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (32 loc) · 942 Bytes
/
Makefile
File metadata and controls
45 lines (32 loc) · 942 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
34
35
36
37
38
39
40
41
42
43
44
45
VENV_BIN = python3 -m venv
VENV_DIR ?= .venv
VENV_ACTIVATE = $(VENV_DIR)/bin/activate
VENV_RUN = . $(VENV_ACTIVATE)
venv: $(VENV_ACTIVATE)
$(VENV_ACTIVATE): pyproject.toml
test -d $(VENV_DIR) || $(VENV_BIN) $(VENV_DIR)
$(VENV_RUN); pip install -e ".[dev]"
touch $(VENV_DIR)/bin/activate
clean:
rm -rf build/
rm -rf .eggs/
rm -rf *.egg-info/
rm -rf .venv
clean-dist: clean
rm -rf dist/
lint: venv
$(VENV_RUN); python -m ruff check .
format: venv
$(VENV_RUN); python -m ruff format . && python -m ruff check . --fix
test: venv
$(VENV_RUN); python -m pytest
test-coverage: venv
$(VENV_RUN); coverage run --source=verdin -m pytest tests && coverage lcov -o .coverage.lcov
dist: clean-dist
python -m pip install build
python -m build
install: venv
$(VENV_RUN); pip install -e ".[dev]"
upload: venv
$(VENV_RUN); pip install --upgrade twine; twine upload dist/*
.PHONY: clean clean-dist format test test-coverage upload