Thank you for your interest in contributing to DeLFT! This guide will help you get started.
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/<your-username>/delft cd delft
- Create a branch for your changes:
git checkout -b my-feature
Requirements: Python 3.10 or 3.11
Set up a virtual environment and install in editable mode:
uv venv --python 3.11
source .venv/bin/activate
uv pip install pip
# macOS
uv pip install -e ".[dev]"
# Linux with CUDA 12.1 (GPU)
uv pip install -e ".[dev,gpu]" --extra-index-url https://download.pytorch.org/whl/cu121We use ruff for linting and formatting. The configuration is in pyproject.toml.
Key settings:
- Line length: 120 characters
- Double quotes for strings
- Imports are sorted automatically
Before committing, run:
ruff check .
ruff format .To auto-fix linting issues:
ruff check --fix .# Run all tests
pytest
# Skip slow tests
pytest -m "not slow"
# Run specific test directory
pytest tests/sequence_labelling/All pull requests must pass:
- Linting:
ruff check . - Formatting:
ruff format --check . - Tests:
pytest
CI runs on both Ubuntu and macOS with Python 3.10 and 3.11.
- Ensure there is an open issue to refer to
- Branch from
master - Make your changes and ensure all CI checks pass locally
- Write a clear description of what your changes do and why
- Submit your pull request against the
masterbranch - Squash and merge
By contributing to DeLFT, you agree to share your contribution under the Apache 2.0 license.