forked from ComposioHQ/composio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
138 lines (116 loc) · 3.07 KB
/
Makefile
File metadata and controls
138 lines (116 loc) · 3.07 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
.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: fmt
fmt: format-code
@echo
.PHONY: check-code
check-code:
tox run-parallel -e isort-check,black-check,flake8,mypy,pylint
.PHONY: chk
chk: check-code
@echo
.PHONY: format-and-check
format-and-check:
make format-code
make check-code
.PHONY: env
env: clean
if [ -z "$$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 swe;\
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;\
pipenv run pip install -e .;\
echo "Enter virtual environment with all development dependencies now: 'pipenv shell'.";\
else\
echo "In a virtual environment! Exit first: 'exit'.";\
fi
.PHONY: login
login:
@composio logout
@composio login
.PHONY: login-staging
login-staging:
@COMPOSIO_BASE_URL=https://staging-backend.composio.dev/api make login
.PHONY: login-prod
login-prod:
@COMPOSIO_BASE_URL=https://backend.composio.dev/api make login
test-demo:
for dir in plugins/*; do \
find $$dir -name '*_demo.py' -exec python3 {} \;;\
done