-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile
74 lines (56 loc) · 1.91 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
65
66
67
68
69
70
71
72
73
74
run:
poetry run llmgraph concepts-general https://en.wikipedia.org/wiki/Large_language_model --levels 2 --llm-model gpt-3.5-turbo --llm-temp 0.0
build:
poetry build
install:
poetry install
publish:
# One time: poetry config pypi-token.pypi <your-pypi-token>
poetry publish --build
publish-test:
# One time: poetry config repositories.test-pypi https://test.pypi.org/legacy/
# One time: poetry config pypi-token.test-pypi <your-test-pypi-token>
poetry publish -r test-pypi
test-install-from-pypi:
rm -rf venv_install_test
python3 -m venv venv_install_test
source venv_install_test/bin/activate ; pip install llmgraph
source venv_install_test/bin/activate ; llmgraph --help
source venv_install_test/bin/activate ; llmgraph --version
source venv_install_test/bin/activate ; pip list | grep llmgraph
rm -rf venv_install_test
poetry-config:
poetry config --list
poetry-show-tree:
poetry show --tree
poetry-gen-requirements:
poetry export --output requirements.txt
poetry-update:
# 1. Update pyproject.toml (requires plugin poetry-plugin-up as of March 2024)
# https://github.com/MousaZeidBaker/poetry-plugin-up
# One time: poetry self add poetry-plugin-up
poetry up --latest
# 2. Update poetry.lock
poetry update
test:
poetry run coverage run -m pytest -vvv -s ./tests
poetry run coverage report
test-selected:
poetry run coverage run -m pytest -vvv -s ./tests -k test_console
poetry run coverage report
black-check:
poetry run black llmgraph tests --check --verbose
black:
poetry run black llmgraph tests
ruff-check:
poetry run ruff check .
ruff:
poetry run ruff check . --fix
pre-commit:
poetry run pre-commit run --all-files
pip-audit:
poetry run pip-audit
.DEFAULT_GOAL := help
.PHONY: help
help:
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'