-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (50 loc) · 1.56 KB
/
Makefile
File metadata and controls
66 lines (50 loc) · 1.56 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
54
55
56
57
58
59
60
61
62
63
64
65
66
.PHONY: help install install-dev precommit lint format type test coverage docs docs-serve build wheel sdist docker-build docker-run
help:
@echo "Common tasks:"
@echo " make install # install runtime deps"
@echo " make install-dev # install dev+docs extras"
@echo " make precommit # install pre-commit hooks"
@echo " make lint # ruff + ruff-format + black check"
@echo " make format # ruff-format + black + isort"
@echo " make type # mypy type checks"
@echo " make test # run pytest"
@echo " make coverage # run pytest with coverage"
@echo " make docs # build Sphinx HTML docs"
@echo " make docs-serve # serve docs/_build/html via http.server"
@echo " make build # build wheel/sdist"
@echo " make docker-build # build docker image"
@echo " make docker-run # run image default demo"
install:
pip install -r requirements.txt
install-dev:
pip install -e .[dev,docs,sci,plot]
precommit:
pre-commit install
lint:
ruff check .
ruff format --check .
black --line-length 100 --check .
format:
ruff format .
black --line-length 100 .
isort --profile black --line-length 100 .
type:
mypy transformer_instant
test:
pytest -q
coverage:
coverage run -m pytest
coverage report -m
docs:
sphinx-build -b html docs docs/_build/html
docs-serve:
python -m http.server --directory docs/_build/html 8000
build: wheel sdist
wheel:
python -m build --wheel
sdist:
python -m build --sdist
docker-build:
docker build -t exactstep:cpu .
docker-run:
docker run --rm exactstep:cpu