Thank you for your interest in contributing to embpy! This guide outlines our local development workflows, branch conventions, and continuous integration testing matrices.
Clone the repository:
git clone https://github.com/theislab/embpy.git
cd embpyWe recommend setting up an isolated virtual environment:
# Using Python venv
python -m venv .venv
source .venv/bin/activate # On Windows PowerShell: .venv\Scripts\Activate.ps1
# Install in editable mode with development, testing, and model extras
pip install -e ".[models,test,dev]"| Branch Pattern | Purpose |
|---|---|
main |
Primary branch for active development, releases, and documentation. |
feat/<name> |
New features, model wrappers, or substantial additions. |
fix/<name> |
Bug fixes and compatibility adjustments. |
docs/<name> |
Documentation updates and guides. |
Please ensure all new feature branches branch from and target main.
We use pytest for automated testing:
# Run the core test suite
python -m pytest tests/ -v
# Run tests for a specific modality
python -m pytest tests/ -k "protein"Our GitHub Actions automatically run the test suite against a multi-dimensional matrix on every pull request:
| Dimension | Scope |
|---|---|
| Operating Systems | Ubuntu 22.04 (Linux), macOS (Latest), Windows Server 2022 |
| Python Versions | 3.11, 3.12, 3.13 |
| Execution Targets | CPU Runners (Pull Requests), GPU Self-Hosted Runners (Releases) |
| Packaging Modes | Pure pip core, [models] extras, [all] extras |
Before opening a pull request, ensure that:
- Code adheres to formatting rules (
ruff check .andruff format .). - Windows multiprocessing safety is maintained (
if __name__ == '__main__':guards where appropriate). - Heavy dependencies remain in optional extras rather than the core package.