Skip to content

Development - Contributing

First and foremost (and the easiest), you can star the repository.

Translation

Most of the documentations are in one language (either in Azerbaijani or in English). One can help with translating these pages. Just copy existing documenatation folder (docs/az or docs/en) and translate the content.

Issue

You can also contribute by creating new issue, be it new feature request or pointing out a bug. When indicating bug, it is highly recommended to share OS and library version.

Development

It must be understood that, even though Integrify was monorepo project before, it was later divided into multiple repos: repository per integration. This way changes in one integration does not affect others. Furthermore, we use python namespace packaging logic for our library.

If you want to work with existing integration, fork it and work on it. Open PR after you work is done, and it will be reviewed and merged.

If you want to work on a new integration, open issue at integrify-docs. New repository will be created for you, and as mentioned before, you can just fork it and start working on it.

Start contributing by following next steps. For easier process, it is recommended to frequently use tests and linting in you local environment.

Tip

tl;dr: To format the code, use make format. For testing and linting use make test and make lint respectively. To generate docs use make docs.

Requisites

  • Python version between 3.9 və 3.13
  • git
  • make
  • uv
  • pre-commit

Installation

# Clone the project and cd into it
git clone git@github.com:<your username>/integrify-integration_name-python.git
cd integrify-integration_name-python

# download uv (https://docs.astral.sh/uv/getting-started/installation/#standalone-installer)
curl -LsSf https://astral.sh/uv/install.sh | sh
# For windows `powershell -c "irm https://astral.sh/uv/install.ps1 | more"`

# Setup
uv sync
make setup

New branch

# Checkout to new branch
git checkout -b my-new-feature-branch
# Add your changes...
Warning

Have logical branch name:

  • For bugfix: bug/branch-name
  • For new API and endpoints: api/integration-name
  • Small fix: fix/branch-name
  • Doc based: docs/branch-name

Test and Linting

After finishing the work with code, test and lint the code:

make format
# Integrify uses Rust-based linter: ruff
# https://github.com/astral-sh/ruff

make all
# This command executes multiple other commands (`format`, `lint`, `type-check və `test`)

Generate docs

If you added or changed any signature or docstring, generate new documentation. Material for MkDocs is used for general documentation and mkdocstrings for docstrings.

# Generate docs
make docs
# Make sure this command does not fail

# If you use `make docs-serve` command, you can see new documentation at localhost:8000.

However, consider that the main file is docs/partial.yml, which is read by docs repo and generates its mkdocs.yml.

Commit, Push and PR

After finishing writing, commit and push to your new branch, and create pull request to original repository.

If your code is ready for review, please indicate that in comments. It will be reviewed and merged.

Code Architecture (!)

As this part needs to be detailed, it has its own page.

Documentation

All documentation is written in markdown and generated with Material for MkDocs. API documentation is generated from docstrings with mkdocstrings

Overall, documentation should be clear and understandable. It should be short and precise.

In-code documentation style

Make sure that everything that user might need should be documented. The following should ALWAYS be documented:

  • Modules
  • Classes
  • Functions
  • Module scope variables

Integrify is using Google-style docstrings with PEP 257 format standarts. For more info check: Example Google Style Python Docstrings

You can show example of the function in docstrings. These examples should be fully working code.