Skip to content

Contributing to Tuberia

Getting started

You need:

  • Spark 3.2.
  • Java JDK 11 (Required by Spark).
  • Poetry.
  • Make.

Once you have all the tools installed just open a shell on the root folder of the project and install the dependencies in a new virtual environment with:

$ make install

The previous command also installs some pre-commits.

Check that your package is installed with:

$ poetry run tuberia
▄▄▄█████▓ █    ██  ▄▄▄▄   ▓█████  ██▀███   ██▓ ▄▄▄
▓  ██▒ ▓▒ ██  ▓██▒▓█████▄ ▓█   ▀ ▓██ ▒ ██▒▓██▒▒████▄
▒ ▓██░ ▒░▓██  ▒██░▒██▒ ▄██▒███   ▓██ ░▄█ ▒▒██▒▒██  ▀█▄
░ ▓██▓ ░ ▓▓█  ░██░▒██░█▀  ▒▓█  ▄ ▒██▀▀█▄  ░██░░██▄▄▄▄██
  ▒██▒ ░ ▒▒█████▓ ░▓█  ▀█▓░▒████▒░██▓ ▒██▒░██░ ▓█   ▓██▒
  ▒ ░░   ░▒▓▒ ▒ ▒ ░▒▓███▀▒░░ ▒░ ░░ ▒▓ ░▒▓░░▓   ▒▒   ▓▒█░
    ░    ░░▒░ ░ ░ ▒░▒   ░  ░ ░  ░  ░▒ ░ ▒░ ▒ ░  ▒   ▒▒ ░
  ░       ░░░ ░ ░  ░    ░    ░     ░░   ░  ▒ ░  ░   ▒
            ░      ░         ░  ░   ░      ░        ░  ░
Version 0.0.0

If you can see that funky logo your installation is correct. Note that the version may change.

If you do not want to use poetry run in front of all your commands just activate the virtual environment with poetry shell. Use exit if you want to deactivate the environment.

How do I build the package?

You can build the package without installing the dependencies or without a proper Spark installation. Use make build or just make. You should see something like:

$ make
poetry build
Building tuberia (0.0.0)
  - Building sdist
  - Built tuberia-0.0.0.tar.gz
  - Building wheel
  - Built tuberia-0.0.0-py3-none-any.whl

How do I run tests?

Run tests locally with:

$ make test

Contribution guidelines

  • The code is auto-formatted by Black, so you can write the code without following any style guide and a Black pre-commit will take care of making it consistent with the current codebase.
  • Write tests: test not added in the PR, test that will never be added.