- Make sure your machine has
python>=3.8andpipenvinstalled - Run
make envto create a fresh virtual environment - Run
pipenv shellto enter virtual environment shell
- Composio follows standard python naming conventions, eg.
snake_casefor variables, method names andPascalCasefor class names. - Make sure the methods are well documented with proper usage of
doctrings - The codebase follows strict formatting guidelines so run
make format-codeortox -e isortandtox -e blackonce you're done writing code to fix the formatting. - The framework and the plugins are strictly type checked, so make sure to run
tox -e mypyto catch any typing errors and fix them before pushing the code to your PR. - Keep API compatibility in mind. Although
composiodoes not have a LTS release yet there are a lot of downstream dependencies which would be affected by a breaking changes, so if there are any breaking changes on your PR try to maintain backwards compatibility by introducing a deprecation warning on the existing API.
- When branching out use
{purpose}/{name}format, for example- To create a feature branch,
feat/feature-name - To create a bug fix branch,
fix/fix-nameorfix/issue-number(fix/12) - To add tests,
test/api-name - For documentation,
docs/change-name
- To create a feature branch,
- Follow semantic commit standards
- Use a descriptive title for creating a PR
fix: login cli toolis a bad way to name a PRFixes the user validation on the login commandis more apt way to name a PR
- Make sure to specify the breaking changes on the PR description
- Add unit tests whenever possible as a proof that your code works
- Make sure to run the code formatters and linters before pushing your code to save some time on the CI.
Composio uses
isortandblackfor code formattingflake8andpylintfor lintingmypyfor type checking
To run each of these individually use tox
- Run code formatting using
tox -e isortandtox -e black - Check code formatting using
tox -e isort-checkandtox -e black-check - Run linters using
tox -e flake8andtox -e pylint - Run type checking using
tox -e mypy
Run unit tests using tox -e test to verify the changes you made and check the code coverage.
COMPOSIO_API_KEY: Environment variable for Composio API keyCOMPOSIO_BASE_URL: Environment variable for Composio API server base URL