- Make sure your machine has
python>=3.8
andpipenv
installed - Run
make env
to create a fresh virtual environment - Run
pipenv shell
to enter virtual environment shell
- Composio follows standard python naming conventions, eg.
snake_case
for variables, method names andPascalCase
for class names. - Make sure the methods are well documented with proper usage of
docstrings
- The codebase follows strict formatting guidelines so run
make format-code
ortox -e isort
andtox -e black
once 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 mypy
to catch any typing errors and fix them before pushing the code to your PR. - Keep API compatibility in mind. Although
composio
does 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-name
orfix/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 tool
is a bad way to name a PRFixes the user validation on the login command
is 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
isort
andblack
for code formattingflake8
andpylint
for lintingmypy
for type checking
To run each of these individually use tox
- Run code formatting using
tox -e isort
andtox -e black
- Check code formatting using
tox -e isort-check
andtox -e black-check
- Run linters using
tox -e flake8
andtox -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