forked from yukinarit/pyserde
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (32 loc) · 1.05 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
SHELL:=/bin/bash
PYTHON ?= python
POETRY ?= poetry
.PHONY: all setup build test examples coverage fmt check docs open-docs bench
all: setup pep8 mypy docs test examples
setup:
$(POETRY) install
$(POETRY) run pip list
$(POETRY) run pre-commit install
setup-bench:
pushd bench && $(POETRY) install && popd
build:
$(POETRY) build
test:
$(POETRY) run pytest tests --doctest-modules serde -v -nauto
examples:
pushd examples && $(POETRY) run $(PYTHON) runner.py && popd
coverage:
$(POETRY) run pytest tests --doctest-modules serde -v -nauto --cov=serde --cov-report term --cov-report xml --cov-report html
fmt:
$(POETRY) run pre-commit run black -a
check:
$(POETRY) run pre-commit run -a
$(POETRY) run mypy .
docs:
mkdir -p docs out/api out/guide/en
$(POETRY) run pdoc -e serde=https://github.com/yukinarit/pyserde/tree/main/serde/ serde -o out/api
mdbook build -d ../../out/guide/en ./docs/en
open-docs:
$(POETRY) run pdoc -e serde=https://github.com/yukinarit/pyserde/tree/main/serde serde
bench:
pushd bench && $(POETRY) run $(PYTHON) bench.py && popd