We use uv as our package manager for fast, reliable dependency management.
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone the repository
git clone https://github.com/bigbio/sdrf-pipelines.git
cd sdrf-pipelines
# Create virtual environment and install all dependencies (including dev)
uv sync --group dev
# Activate the virtual environment (optional - you can also use `uv run` prefix)
source .venv/bin/activate # Linux/macOS
# or
.venv\Scripts\activate # WindowsAfter setting up the development environment:
uv run pytest
# Or with coverage
uv run pytest --cov=sdrf_pipelinesWe use Python type hints and when added, they need to be checked with mypy:
uv run mypy src/sdrf_pipelinesWe use ruff for both linting and code formatting. Ruff is an extremely fast Python linter and formatter written in Rust that replaces multiple tools (flake8, isort, black, etc.).
To pass the CI tests, the code must adhere to the code standards set in pyproject.toml.
# Check for linting issues
uv run ruff check .
# Auto-fix linting issues where possible
uv run ruff check --fix .
# Format code
uv run ruff format .
# Check formatting without making changes
uv run ruff format --check .We use pre-commit to automatically run code quality checks before each commit. The hooks run ruff (linting + formatting) and mypy (type checking).
Install the hooks (recommended):
uv run pre-commit installThis will automatically run checks on staged files before each commit.
Run manually on all files:
uv run pre-commit run --all-filesCurrent pre-commit hooks:
end-of-file-fixer- Ensures files end with a newlinetrailing-whitespace- Removes trailing whitespacedetect-private-key- Prevents committing private keysruff- Linting with auto-fixruff-format- Code formattingmypy- Static type checking
- Fork the repository and create a feature branch
- Ensure all pre-commit hooks pass:
uv run pre-commit run --all-files - Ensure all tests pass:
uv run pytest - Update documentation if needed
- Submit a pull request with a clear description of changes