forked from ComposioHQ/composio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
116 lines (99 loc) · 2.66 KB
/
Makefile
File metadata and controls
116 lines (99 loc) · 2.66 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
.PHONY: clean-build
clean-build:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -fr {} +
find . -type d -name __pycache__ -exec rm -rv {} +
for dir in plugins/*; do \
if [ -d "$$dir" ]; then \
rm -rf "$$dir"/dist; \
fi \
done
.PHONY: clean-pyc
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
find . -name '.DS_Store' -exec rm -fr {} +
.PHONY: clean-test
clean-test: clean-cache
rm -fr htmlcov/
rm -f .coverage
rm -fr coverage.xml
find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \;
.PHONY: clean-cache
clean-cache:
rm -fr .tox/
rm -fr .pytest_cache/
rm -fr .mypy_cache/
.PHONY: clean
clean: clean-test clean-build clean-pyc
.PHONY: dist
dist:
rm -rf dist/
python setup.py sdist
.PHONY: build
build:
python -m build && \
for dir in plugins/*; do \
if [ -d "$$dir" ]; then \
python -m build "$$dir" --outdir="$$dir"/dist; \
fi \
done
.PHONY: publish
publish: dist
twine upload dist/* --username token --password "$$PYPI_PASSWORD" && \
for dir in plugins/*; do \
if [ -d "$$dir" ]; then \
twine upload "$$dir"/dist/* --username token --password "$$PYPI_PASSWORD"; \
fi; \
done
.PHONY: test-publish
test-publish: dist
twine upload --repository testpypi dist/* --username token --password "$$PYPI_PASSWORD" && \
for dir in plugins/*; do \
if [ -d "$$dir" ]; then \
twine upload --repository testpypi "$$dir"/dist/* --username token --password "$$PYPI_PASSWORD"; \
fi \
done
.PHONY: format-code
format-code:
tox -e isort
tox -e black
.PHONY: check-code
check-code:
tox -e isort-check
tox -e black-check
tox -e flake8
tox -e mypy
tox -e pylint
.PHONY: env
env: clean
if [[ "$$VIRTUAL_ENV" == "" ]];\
then\
pipenv --rm;\
pipenv --clear;\
pipenv --python 3.10;\
pipenv install --skip-lock;\
pipenv install --dev --skip-lock;\
pipenv run pip install -e .;\
pipenv run pip install -e plugins/autogen;\
pipenv run pip install -e plugins/claude;\
pipenv run pip install -e plugins/crew_ai;\
pipenv run pip install -e plugins/griptape;\
pipenv run pip install -e plugins/julep;\
pipenv run pip install -e plugins/langchain;\
pipenv run pip install -e plugins/llamaindex;\
pipenv run pip install -e plugins/lyzr;\
pipenv run pip install -e plugins/openai;\
echo "Enter virtual environment with all development dependencies now: 'pipenv shell'.";\
else\
echo "In a virtual environment! Exit first: 'exit'.";\
fi
test-demo:
for dir in plugins/*; do \
find $$dir -name '*_demo.py' -exec python3 {} \;;\
done