Skip to content

Contributing

Thank you for your interest in contributing to DRLS! This guide covers the development workflow, build commands, testing, and code standards.

Development Setup

See the Dev Setup Guide for complete environment setup instructions.

Quick Start

git clone https://github.com/drls-io/drls.git
cd drls

Build Commands

Java/Scala (Core)

cd core
mvn clean package -DskipTests

Note

Requires Java 21. Set JAVA_HOME if needed.

Python

cd python
pip install -e ".[dev]"

Rust Workspace (Backend + Operators)

cd rust
cargo build --workspace

Requires Python 3.12+ with drls[dev] installed (PyO3 needs Python headers for the ui-server crate).

React Frontend

cd ui/frontend
npm install --legacy-peer-deps
npm run build

gRPC Stubs

# Regenerate Python stubs from lakehouse.proto
drls grpc-codegen

Testing

Python Unit Tests

python -m pytest python/drls/tests/ -v -k "not end_to_end"

End-to-End Tests

E2E tests require a running Spark + Ray cluster:

JAVA_HOME=/path/to/jdk-21 DRLS_E2E=1 \
  python -m pytest python/drls/tests/test_streaming_e2e.py -v

Rust Tests

cd rust
cargo test --workspace

Frontend Lint

cd ui/frontend
npm run lint
npm run format:check

Linting and Formatting

All code must pass lint checks before merging. The CI pipeline enforces these automatically.

Python — Ruff

ruff check python/
ruff format --check python/

Configuration in python/pyproject.toml:

  • Rules: E, F, W, I, UP, B
  • Line length: 120
  • Ignored: E501, E741, UP007

Java/Scala — Checkstyle + Spotless

cd core
mvn checkstyle:check -DskipTests
mvn spotless:check -DskipTests
  • Java: google-java-format
  • Scala: scalafmt 3.8.3

Rust — Clippy

cd rust
cargo clippy --workspace -- -D warnings

Frontend — ESLint + Prettier

cd ui/frontend
npm run lint
npm run format:check

CI Pipeline

The CI runs 7 parallel jobs on every push and pull request:

Job What it does
maven-build Build JVM modules (Java 21)
maven-lint Checkstyle + Spotless check
python-tests Unit tests with pytest
python-lint Ruff check + format check
ui-build ESLint + Prettier + Vite build
rust-build Clippy + tests + release build
docs-build MkDocs strict build

Pull Request Process

  1. Create a feature branch from main:

    git checkout -b feature/my-feature
    

  2. Make your changes and ensure all relevant lint/test checks pass locally.

  3. Push and open a pull request against main.

  4. All CI checks must pass before merge.

Branch Naming

Prefix Use
feature/ New features
fix/ Bug fixes
docs/ Documentation changes
refactor/ Code refactoring

Project Structure

drls/
  core/                        # JVM modules (Maven, Java/Scala)
  python/                      # Python package
  rust/                        # Rust workspace
    crates/
      ui-server/               # Axum REST server + PyO3 (embedded Python)
      shared/                  # Shared CRD types (Pipeline, Notebook)
      pipeline-operator/       # Pipeline orchestrator (kube-rs)
      marimo-operator/         # Notebook lifecycle operator (kube-rs)
  ui/
    frontend/                  # React + Vite + TypeScript
    backend/                   # Symlink → rust/crates/ui-server/
    proto/                     # gRPC definitions (optional server)
  examples/                    # Example scripts
  docs/                        # Documentation (MkDocs)

License

By contributing, you agree that your contributions will be licensed under the same terms as the project:

  • Core, CLI, agentic tools: Apache License 2.0
  • UI (Rust backend + React frontend): BSL / Proprietary