Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 2.88 KB

CONTRIBUTING.md

File metadata and controls

61 lines (42 loc) · 2.88 KB

Contributing

Overview

This documents explains the processes and practices recommended for contributing enhancements to this repository.

  • Generally, before developing enhancements to this charm, you should consider opening an issue explaining your problem with examples, and your desired use case.
  • If you would like to chat with us about your use-cases or proposed implementation, you can reach us at Data Platform Canonical Mattermost public channel or Discourse.
  • All enhancements require review before being merged. Code review typically examines
    • code quality
    • test coverage
    • user experience for interacting with the other components of the Charmed Spark solution.
  • Please help us out in ensuring easy to review branches by rebasing your pull request branch onto the main branch. This also avoids merge commits and creates a linear Git commit history.

To build and develop the package in this repository, we advise to use Poetry. For installing poetry on different platforms, please refer to here.

Install from source

To install the package with poetry, checkout the repository

git clone https://github.com/canonical/spark-k8s-toolkit-py.git
cd spark-k8s-toolkit-py/

and run

poetry install

Developing

When developing we advise you to use virtual environment to confine the installation of this package and its dependencies. Please refer to venv, pyenv or conda, for some tools that help you to create and manage virtual environments. We also advise you to read how Poetry integrates with virtual environments here.

The project uses tox for running CI/CD pipelines and automation on different enviroments, whereas setup of python agnostic components can be done using the Makefile.

You can create an environment for development with tox:

tox devenv -e integration
source venv/bin/activate

Testing

Using tox you can also run several operations, such as

tox run -e fmt           # update your code according to linting rules
tox run -e lint          # code style
tox run -e unit          # unit tests
tox run -e integration   # integration tests
tox run -e all-tests     # unit+integration tests
tox                      # runs 'lint' and 'unit' environments

Canonical Contributor Agreement

Canonical welcomes contributions to the Charmed Kafka Operator. Please check out our contributor agreement if you're interested in contributing to the solution.