Skip to content

Latest commit

 

History

History
54 lines (32 loc) · 1.59 KB

CONTRIBUTING.rst

File metadata and controls

54 lines (32 loc) · 1.59 KB

Contributing

Thanks for wanting to contribute to the project! Here's a quick rundown of how to get it running for development.

Install pyenv

You don't need pyenv, but development will be easier with it. Follow these instructions to install it, and then create a virtual environment. Shillelagh is tested with Python 3.8-3.11, so make sure to install one of those versions.

$ pyenv install 3.10.3
$ pyenv virtualenv 3.10.3 shillelagh
$ cd /path/to/shillelagh/
$ pyenv local shillelagh

Install dependencies

You want to install the package in developer mode (-e) with all the dependencies needed for testing:

$ pip install -e ".[testing]"

Install pre-commit hooks

Shillelagh uses a lot of pre-commit hooks.

$ pre-commit install

Now, you can run pre-commit run to check that the files you modified will pass CI.

Running tests

To run tests:

$ pytest --cov=src/shillelagh -vv tests/ --doctest-modules src/shillelagh --without-integration --without-slow-integration

Or, if you're using pyenv and created a virtual environment called shillelagh you can use the Makefile:

$ make test

Shillelagh has unit and integration tests. Don't worry about integration tests: they require credentials in order to run, so you won't be able to run them locally, and the CI tests will fail when you create your PR.