-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathMakefile
50 lines (35 loc) · 1.23 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
47
48
49
50
.ONESHELL:
.PHONY: test lint format test-ci lint-ci build upload-release setup docker-shell
venv: venv/touchfile
venv/touchfile: requirements-dev.txt requirements.txt
test -d venv || python3 -m venv venv
. venv/bin/activate; pip install uv; $(MAKE) deps
touch venv/touchfile
deps:
uv pip install -r requirements-dev.txt
deps-ci:
uv pip install --system -r requirements-dev.txt
test-ci:
TESTCONTAINERS_RYUK_DISABLED=true pytest -n auto -x -rP -vv --tb=short --durations=10 --cov=ingestr --no-cov-on-fail
test: venv
. venv/bin/activate; $(MAKE) test-ci
test-specific: venv
. venv/bin/activate; pytest -rP -vv --tb=short --capture=no -k $(test)
lint-ci:
ruff format ingestr && ruff check ingestr --fix
mypy --config-file pyproject.toml --explicit-package-bases ingestr
lint: venv
. venv/bin/activate; $(MAKE) lint-ci
lint-docs:
vale docs --glob='!**/.vitepress/**'
tl: test lint
build:
rm -rf dist && python3 -m build
upload-release:
twine upload --verbose dist/*
setup:
@echo "installing git hooks ..."
@install -m 755 .githooks/pre-commit-hook.sh .git/hooks/pre-commit
docker-shell:
# run a docker container to build and run ingestr
@docker run -v $(PWD):/root/code -w /root/code -it --rm --entrypoint /bin/bash python:3.11