Skip to content

Latest commit

 

History

History
79 lines (60 loc) · 2.42 KB

CONTRIBUTING.md

File metadata and controls

79 lines (60 loc) · 2.42 KB

Contributing

All contributions are welcomed!

Developing

All that is needed to work with this repo is Python and your favorite editor or IDE, although we recommend VS Code.

Setup

To set up your local environment to work on this project:

Clone the repo, change into the directory where you cloned the repo, and then run the bootstrap script

git clone https://github.com/swellaby/letra.git
cd letra
pip install -r dev-requirements.txt

Task/Script Runner

This project uses invoke to make it easy to run various scripts and tools for common development tasks.

Note that by default invoke tasks can be triggered with either the full invoke command, or the shorthand inv. The sections below use the inv shorthand for brevity.

Testing

This project uses the pytest framework for automated testing.

To execute the test suite, run:

inv test
# or, shorter-hand
inv t

Linting

This project uses pycodestyle for linting and analysis.

pycodestyle can either be invoked directly, or the invoke tasks can be leveraged for shorthand.

inv lint
# or, shorter-hand
inv l

Formatting

This project uses black for automated code formatting.

In order to align with the corresponding guidance from PEP-8 and cooperate with pycodestyle, we do utilize a maximum line length of 79 and have updated the black configuration accordingly.

To check whether the code is currently formatted correctly, run

inv check-format
# or, shorter-hand
inv cf
# or
inv fc

To reformat all code to comply with the formatting rules, run:

inv format
# or, shorter-hand
inv f

Submitting changes

Swellaby members can either create a branch within the repository or a branch in their personal fork, make changes in their branch, and then submit a PR.

Outside contributors should fork the repository, make changes in the fork, and then submit a PR.

Back to Top