Skip to content

Latest commit

 

History

History
91 lines (57 loc) · 3.66 KB

CONTRIBUTING.md

File metadata and controls

91 lines (57 loc) · 3.66 KB

How to Contribute

Basic Pitch welcomes your contributions!

Getting Started

To get your environment set up to build basic-pitch, you'll need Python and Pip installed on your machine.

We recommend first installing the following non-python dependencies:

  • libsndfile is a C library for reading and writing files containing sampled sound through one standard library interface.
    • To install on MacOs, run brew install libsndfile using Homebrew
    • To install on Windows, run choco install libsndfile using Chocolatey
    • To install on Ubuntu, run sudo apt-get update && sudo apt-get install --no-install-recommends -y --fix-missing pkg-config libsndfile1
  • ffmpeg is a complete, cross-platform solution to record, convert and stream audio in all basic-pitch supported formats
  • sox is a general purpose sound processing utility library used to process and transform training data used for training the basic-pitch model.

To compile a debug build of basic-pitch that allows using a debugger (like gdb or lldb), use the following command to build the package locally and install a symbolic link for debugging:

python3 setup.py build develop

Then, you can import basic_pitch from Python (or run the tests with tox) to test out your local changes.

Workflow

We follow the GitHub Flow Workflow:

  1. Fork the project
  2. Check out the main branch
  3. Create a feature branch
  4. Write code and tests for your change
  5. From your branch, make a pull request against https://github.com/spotify/basic-pitch
  6. Work with repo maintainers to get your change reviewed
  7. Wait for your change to be pulled into https://github.com/spotify/basic-pitch/main
  8. Delete your feature branch

Testing

We use tox for testing - running tests from end-to-end should be as simple as:

tox

Style

Use black with defaults for Python code.

Issues

When creating an issue please try to ahere to the following format:

module-name: One line summary of the issue (less than 72 characters)

### Expected behaviour

As concisely as possible, describe the expected behaviour.

### Actual behaviour

As concisely as possible, describe the observed behaviour.

### Steps to reproduce the behaviour

List all relevant steps to reproduce the observed behaviour.

Documentation

We also welcome improvements to the project documentation or to the existing docs. Please file an issue.

First Contributions

If you are a first time contributor to basic-pitch, familiarize yourself with the:

When you're ready, navigate to issues. Some issues have been identified by community members as good first issues.

There is a lot to learn when making your first contribution. As you gain experience, you will be able to make contributions faster. You can submit an issue using the question label if you encounter challenges.

License

By contributing your code, you agree to license your contribution under the terms of the LICENSE.

Code of Conduct

Read our Code of Conduct for the project.