Skip to content

Contribution Guide

Carson Woods edited this page Dec 15, 2019 · 1 revision

Overview

First of all, thanks for wanting to help contribute to the development of Lemonspotter. We've outlined some best practices below to help streamline getting started making contributions.

Use Forks

When making changes to the general codebase, make a new branch to hold all of your changes. In most cases you should fork the Lemonspotter project and create a new branch on your forked project. Once you have finished making changes, open a pull request to merge your changes into the parent repository.

Unit Testing

Lemonspotter uses a combination of pytest, hypothesis, flake8, and mypy to ensure that changes made don't break core functionality. After making your changes, make sure that you are running the following tests to help expedite your development.

flake8:

flake8 is a library that validates that the python code within Lemonspotter conforms to the PEP8 standard. This is just to keep the code readable and following best practices. To run this test, run the following command: python -m lemonspotter --flake8

pytest/hypothesis

Pytest is a python framework for running unit tests. These ensure that the core functionality of Lemonspotter doesn't change unintentionally. Hypothesis is another framework used within pytest to generate additional tests automatically. (Yes it is ironic that a generative testing software is relying on other generative testing software). This test can be run with the following command: python -m lemonspotter --pytest

mypy

The final test suite is a mypy test. This is a static typing test that ensures that all of our types line up within Lemonspotter. This can be run via: python -m lemonspotter --mypy

Requirements

All of these tests require 3rd party dependencies. They are listed in the requirements.txt file and can be installed via pip with: pip install -r requirements.txt

Clone this wiki locally