-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
56 lines (44 loc) · 1.27 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
# Check Python
PYTHON:=$(shell command -v python 2> /dev/null)
ifndef PYTHON
PYTHON:=$(shell command -v python3 2> /dev/null)
endif
ifndef PYTHON
$(error "Python is not available, please install.")
endif
clean:
@rm -rf build dist .eggs *.egg-info
@rm -rf .benchmarks .coverage coverage.xml htmlcov report.xml .tox
@find . -type d -name '.mypy_cache' -exec rm -rf {} +
@find . -type d -name '__pycache__' -exec rm -rf {} +
@find . -type d -name '*pytest_cache*' -exec rm -rf {} +
@find . -type f -name "*.py[co]" -exec rm -rf {} +
format: clean
poetry run black numalogic/ examples/ tests/
lint: format
poetry run ruff check --fix .
# install all dependencies
setup:
poetry install --with dev,torch,jupyter --all-extras
# test your application (tests in the tests/ directory)
test:
poetry run pytest -v tests/
publish:
@rm -rf dist
poetry build
poetry publish
requirements:
poetry export -f requirements.txt --output requirements.txt --without-hashes
tag:
VERSION=v$(shell poetry version -s)
@echo "Tagging version $(VERSION)"
git tag -s -a $(VERSION) -m "Release $(VERSION)"
/usr/local/bin/mkdocs:
$(PYTHON) -m pip install mkdocs==1.3.0 mkdocs_material==8.3.9
# docs
.PHONY: docs
docs: /usr/local/bin/mkdocs
mkdocs build
.PHONY: docs-serve
docs-serve: docs
mkdocs serve