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.
Therefore, for development, you'll need to install both
python together with
pnpm to get started.
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.
Developing on Linux
sudo apt update
sudo apt install python3 python3-dev
curl -sSL https://install.python-poetry.org | python3 -
sudo apt install nodejs
curl -fsSL https://get.pnpm.io/install.sh | sh -
# check your installed node version
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
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.
and run the development server
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.
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.