Contributing

Thank you for your interest in contributing to Crop Row Connector and we welcome all pull request. To get set for development on Crop Row Connector see the following.

Development uses uv and pre-commit for code linting and formatting. To setup development with uv and pre-commit follow these steps after cloning the repository:

Let uv create a virtual environment:

uv sync --all-extras --reinstall

Install pre-commit hooks

uv run pre-commit install

You are now ready to contribute.

Commit Message

A changelog is automatically generated when making a release based on commit messages using git cliff. For this to work commits needs follow the Conventional Commits standard. This is enforced with pre-commits. See examples for inspiration. The changelog will sort the commits into the following types:

  • feat

  • fix

  • refactor

  • docs

  • test

  • pref

  • chore

Running Test

Test is automatically run when making a commit, but can also be run with:

uv run pytest

This will also generate a html coverage report in test_coverage.

Generating Documentation

To generate this documentation, in the docs folder run:

uv run make html

This will generate html documentation in the docs/build/html folder.

Creating Github Release

When a new release is desired from the commits to the master branch, the following steps will create a new release and bump the version number:

  • Change version number in pyproject.toml and commit to main.

  • Tag the commit with the version number: git tag vXX.XX.XX.

  • Push the changes to github: git push origin (where origin is the name of github upstream).

  • push the tag to github: git push origin tag vXX.XX.XX.

This will start the github actions to create a new release and publish the code to PyPI together with generating the new documentation.