@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 03:37 UTC

next
text 90 lines 2.07 KB
Raw
1 .PHONY: clean-build sync provider create-provider env fmt chk snt tst type_inference dead-code bump build build-core format check sanity test
2
3 PROVIDER_DIRS := $(patsubst %/,%,$(sort $(dir $(wildcard providers/*/pyproject.toml))))
4
5 # Extra `python -m build` flags. The release workflow sets `--no-isolation` so
6 # builds use the locked setuptools instead of fetching one.
7 BUILD_ARGS ?=
8
9 clean-build:
10 @rm -rf dist/ build/
11 @set -e; for provider in $(PROVIDER_DIRS); do\
12 rm -rf build $$provider/dist $$provider/build;\
13 done
14
15 sync:
16 @uv sync
17 @uv pip install -e .
18
19 provider:
20 @set -e; for provider in $(PROVIDER_DIRS); do\
21 uv pip install $$provider;\
22 done
23
24 create-provider:
25 @if [ -z "$(name)" ]; then\
26 echo "Please provide a provider name: make create-provider name=<provider-name> [agentic=true] [output=<directory>]";\
27 exit 1;\
28 fi
29 @ARGS="$(name)";\
30 if [ "$(agentic)" = "true" ]; then\
31 ARGS="$$ARGS --agentic";\
32 fi;\
33 if [ ! -z "$(output)" ]; then\
34 ARGS="$$ARGS --output-dir $(output)";\
35 fi;\
36 bash scripts/create-provider.sh $$ARGS
37
38 env:
39 @echo "* creating new environment"
40 @if [ -z "$$VIRTUAL_ENV" ];\
41 then\
42 uv venv --seed --prompt composio --python 3.12;\
43 uv sync;\
44 uv sync --dev;\
45 make provider;\
46 uv pip install -e .;\
47 echo "* enter virtual environment with all development dependencies now";\
48 else\
49 uv sync;\
50 uv pip install -e .;\
51 echo "* already in a virtual environment (exit first ('deactivate') to create a new environment)";\
52 fi
53 @echo "* run 'source .venv/bin/activate' to enter the development environment."
54
55
56 fmt:
57 @nox -s fmt
58
59 chk:
60 @nox -s chk
61
62 dead-code:
63 @nox -s dead_code
64
65 snt:
66 @nox -s snt
67
68 tst:
69 @nox -s tst
70
71 type_inference:
72 @nox -s type_inference
73
74 # Friendly aliases for the short session names above (e.g. `make test` == `make tst`).
75 format: fmt
76 check: chk
77 sanity: snt
78 test: tst
79
80 bump: clean-build
81 @uv run python scripts/bump.py
82
83 build-core: clean-build
84 @./.venv/bin/python -m build $(BUILD_ARGS)
85
86 build: build-core
87 @set -e; for provider in $(PROVIDER_DIRS); do\
88 ./.venv/bin/python -m build $$provider $(BUILD_ARGS);\
89 cp $$provider/dist/* dist/;\
90 done