Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 2.33 KB

File metadata and controls

82 lines (59 loc) · 2.33 KB

Contributing

We welcome community contributions to the Lightning Pose repo! If you have found a bug or would like to request a minor change, please open an issue.

In order to contribute code to the repo, please follow the steps below.

We strive to maintain a fun and inclusive environment for our users and contributors. See our code of conduct for more information.

Set up a development installation

In order to make changes to Lightning Pose, you will need to fork the repo.

If you are not familiar with git, check out this guide.

Whenever you initially install the lightning pose repo, instead of

pip install -e .

run

pip install -e .[dev]

to install additional development tools.

Create a pull request

After making changes in your fork, open a pull request from your fork. Please read through the rest of this document before submitting the request.

Linting

We use ruff for formatting, import sorting, and linting. Run both commands before submitting a pull request:

ruff check --fix lightning_pose tests

To check without modifying files:

ruff check lightning_pose tests

If you set up the pre-commit hook (see below), ruff runs automatically on every commit.

Pre-commit hook

Install the pre-commit hook so ruff runs automatically before each commit:

pre-commit install

To run it manually against all files:

pre-commit run --all-files

Testing

To run the tests locally, you must have access to a GPU. Navigate to the Lightning Pose directory and simply run

pytest

Building the docs

Documentation is built automatically when a pull request is opened, so this step is not required. If you have changed the docs and want to preview the result locally before pushing, from the lightning-pose directory run:

cd docs
make html

Then open docs/_build/html/index.html in your browser.