Skip to main content

🎉 We released Spotlight 1.6.0 check it out →

Version: 1.6.0

Contributing to Spotlight

Setting up Spotlight for development​

In order to start development in spotlight as of now the easiest method is to checkout the repository and install development dependencies.

The spotlight backend is a FastAPI server written in python, serving the dataset and the frontend.
The frontend is a React application written in typescript.

Therefore, for development, you'll need to install both python together with poetry and nodejs with pnpm to get started.

info

If you want to contribute to spotlight in any form and struggle anywhere along the way please reach out to us.

We are more than happy to help out and guide you through the process.

Install dependencies​

Developing on Linux​

Install python3 together with poetry

sudo apt update
sudo apt install python3 python3-dev
curl -sSL https://install.python-poetry.org | python3 -

Install nodejs together with pnpm

sudo apt install nodejs
curl -fsSL https://get.pnpm.io/install.sh | sh -

# check your installed node version
node -v

We recommend using at least node version 18. In order to install the latest version check out NodeSource on Github

You might need to restart your terminal in order to use pnpm as a command.

Setup Spotlight Repository​

Visit the spotlight repository and click Fork. Setup your forked repository by cloning it and adding spotlight as an additional remote.

git clone https://github.com/YOUR_GIT_USERNAME/spotlight.git
cd spotlight
git remote add upstream https://github.com/renumics/spotlight.git

Inside the spotlight repository you'll find a Makefile which contains all the commands to get you started. First install development dependencies and pre-commit.

make init

and run the development server

make dev

Submit your work​

Please make sure that you have pre-commit hooks installed and that the hooks successfully ran for the added changes.
This can be verified by creating a commit and checking if automated tests are run before the commit is created.

poetry run pre-commit install --hook-type pre-commit
poetry run pre-commit install --hook-type pre-push

Submit your improvements, fixes and new features to Spotlight by creating a Pull Request.

Using direnv​

In order to make development easier direnv can be used to automatically setup the environment on entering the spotlight folder.

The provided .envrc file automatically activates the poetry environment and sets environment variables in .env and .env.local.