Skip to content

Contributing to Larq

👍 🎉 First off, thanks for taking the time to contribute! 👍 🎉

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub.

Project setup

To send a Pull Request it is required to fork Larq on GitHub. After that clone it to a desired directory:

git clone

Install all required dependencies for local development by running:

cd larq # go into the directory you just cloned
pip install -e .[tensorflow] # Installs Tensorflow for CPU
# pip install -e .[tensorflow_gpu] # Installs Tensorflow for GPU
pip install -e .[test] # Installs all development dependencies

Run Unit tests

Inside the project directory run:

pytest .

Build documentation

Installs dependencies for building the docs:

pip install nbconvert git+
pip install -e .[docs]

Inside the project directory run:

./ serve

To publish a new version to github pages run:

./ gh-deploy --force

Code style

We use black to format all of our code. We recommend installing it as a plugin for your favorite code editor.

Publish release

  1. Install dependencies
python -m pip install --upgrade setuptools wheel twine
  1. Increment the version number in

  2. Push new tag

git tag <version number>
git push && git push --tags
  1. Build wheels
rm -r build/* dist/*
python sdist bdist_wheel
  1. Upload release
python -m twine upload dist/*