We welcome contributions of all kinds, including:
- Bug fixes
- Documentation improvements (README, docs folder, examples)
- New features
After you have your changes ready, and you create a new pull request, a maintainer will review your PR, may ask for changes, suggest improvements, or approve once ready.
git clone git@github.com:lightly-ai/lightly_studio.git
cd lightly_studio/lightly_studio
make startThis will:
- Install dependencies
- Build the application
- Start an example script
For starting it again, you can skip the build step by just calling make start-example.
Backend code lives in the lightly_studio subdirectory, frontend code in lightly_studio_view.
To run static checks and unit tests use the following commands
# Backend
cd lightly_studio
make static-checks
make test
# Frontend
cd lightly_studio_view
make static-checks
make testWhen updating the code please follow our coding guidelines in ./ai_guidelines. AI coding tools will be able to assist.
We use Playwright for end-to-end testing. Tests need to be run separately for images and videos.
First, start the e2e environment:
make -C lightly_studio start-e2eThen run the tests:
cd lightly_studio_view
npm run test:e2eFirst, start the e2e environment with videos:
make -C lightly_studio start-e2e-with-videosThen run the video tests:
cd lightly_studio_view
npm run test:e2e-videosDocumentation is in the docs folder. To build the documentation, move to the docs folder and run:
make docs
This builds the documentation in the docs/site folder.
Docs can be served locally with:
make serve
The documentation source is in docs/docs. The documentation is written in Markdown (MyST flavor). For more information regarding formatting, see:
- https://pradyunsg.me/furo/reference/
- https://myst-parser.readthedocs.io/en/latest/syntax/typography.html
- Python 3.9+
- Uv version 0.8.17+
- Node.js 22.11+
- Access to Google Cloud Platform (request permissions from @IgorSusmelj)
Clone the example dataset repository inside the backend subdirectory lightly_studio.
It contains sample data used during development.
cd lightly_studio
git clone https://github.com/lightly-ai/dataset_examplesWe recommend using the .env file to set up environment variables. Start by copying .env.example
file to .env:
cd lightly_studio
cp .env.example .envNow edit the .env file:
- Request the
LIGHTLY_STUDIO_LICENSE_KEYfrom a Lightly developer and set its value in the file. - Optionally change the
EXAMPLES_*paths to point to data on your machine. You can leave the defaults to use the cloned dataset examples data.
Choose a script in lightly_studio/src/lightly_studio/examples directory and run it like this:
cd lightly_studio
uv run src/lightly_studio/examples/example.pyNavigate to the backend lightly_studio directory and run:
cd lightly_studio
make startIn a new terminal tab, navigate to the lightly_studio_view directory and copy the environment file:
cd lightly_studio_view
cp .env .env.localThen, define the following variables in your .env.local file:
PUBLIC_SAMPLES_URL=http://localhost:8001/images
PUBLIC_LIGHTLY_STUDIO_API_URL=http://localhost:8001/
Finally, start the frontend:
npm run devThe Makefile includes several helpful commands. Here are some commonly used ones:
Run tests:
make testFormat code:
make formatYou can explore more available commands directly in the Makefile.
To contribute to this repository, you must sign a Contributor License Agreement (CLA). This is a one-time process done through GitHub when you open your first pull request. You will be prompted automatically.
By signing the CLA, you agree that your contributions may be used under the terms of the project license.