-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
64 lines (46 loc) · 1.14 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# PII Codex Makefile
# Used from GitHub workflow and locally
default: install test lint
test: lint test.all
test.cov: test.coverage
install:
@poetry update
@poetry install
$(MAKE) install.extras
$(MAKE) install.pre_commit
install.pre_commit:
@poetry run pre-commit install
install.extras:
@poetry install --extras="detections"
install_spacy_en_core_web_lg:
@python3 -m spacy download en_core_web_lg
jupyter.attach.venv:
@python3 -m ipykernel install --user --name=venv
test.all:
@pytest tests
test.coverage:
@poetry run coverage run -m pytest -vv tests && poetry run coverage report -m --omit="*/test*,config/*.conf" --fail-under=95
@poetry run coverage xml
lint:
@poetry run pylint pii_codex tests
typecheck:
@poetry run mypy pii_codex tests
format.check:
@black . --check
format.fix:
@black .
bump.citation.date:
./scripts/update_citation.sh
docs:
@pdoc --html pii_codex --force -o ./docs/dev
version.bump.patch:
@poetry version patch
$(MAKE) bump.citation.date
version.bump.minor:
@poetry version minor
$(MAKE) bump.citation.date
version.bump.major:
@poetry version major
$(MAKE) bump.citation.date
package:
@poetry build