Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
- Code of Conduct
- Getting Started
- Development Workflow
- Code Standards
- Testing Requirements
- Pull Request Process
This project adheres to a code of conduct. By participating, you are expected to uphold respectful and inclusive behavior.
- Python 3.11+
- Git
- Neo4j (for graph-related development)
- DWSIM (for Phase V development, Windows only)
# Fork and clone the repository
git clone https://github.com/yourusername/entrainer-selection.git
cd entrainer-selection
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
# Copy configuration templates
cp config/infra_config.example.yaml config/infra_config.yaml| Type | Pattern | Example |
|---|---|---|
| Feature | feature/description |
feature/add-tanimoto-similarity |
| Bug Fix | fix/description |
fix/pubchem-rate-limit |
| Documentation | docs/description |
docs/phase2-api-reference |
| Refactor | refactor/description |
refactor/engine-interface |
Follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types: feat, fix, docs, style, refactor, test, chore
Examples:
feat(phase2): add TRIZ contradiction matrix lookup
fix(core): handle PubChem 503 errors with retry
docs(readme): update installation instructions
test(phase4): add GP surrogate unit tests
- Formatter: Black (line length 88)
- Import Sorting: isort
- Linting: flake8
- Type Hints: Required for all public functions
# Run all checks manually
pre-commit run --all-files
# Individual tools
black src/ tests/
isort src/ tests/
flake8 src/ tests/
mypy src/- All public functions require docstrings (Google style)
- Complex algorithms need inline comments
- Update relevant docs when changing behavior
def calculate_safety_score(molecule: Molecule, weights: dict[str, float]) -> float:
"""Calculate composite safety score for a molecule.
Args:
molecule: Molecule object with computed properties.
weights: Dictionary mapping property names to weights.
Returns:
Weighted safety score between 0 (unsafe) and 1 (safe).
Raises:
ValueError: If required properties are missing.
Example:
>>> mol = Molecule(smiles="CCO")
>>> score = calculate_safety_score(mol, {"flash_point": 0.3, "ld50": 0.7})
"""tests/
├── unit/
│ ├── test_core/
│ ├── test_phase1/
│ └── ...
├── integration/
│ ├── test_database/
│ └── test_api/
└── conftest.py
# All tests
pytest
# With coverage
pytest --cov=src --cov-report=html
# Specific phase
pytest tests/unit/test_phase2/
# Integration tests (requires services)
pytest tests/integration/ -m integration- Minimum 80% coverage for new code
- Critical paths (MOBO, safety scoring) require 90%+
- ✅ All tests pass locally
- ✅ Pre-commit hooks pass
- ✅ Documentation updated
- ✅ No merge conflicts with main
## Description
Brief description of changes.
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation
- [ ] Refactoring
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests (if applicable)
- [ ] Manual testing performed
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No new warnings- Submit PR against
mainbranch - Automated checks must pass
- At least one maintainer review required
- Address feedback promptly
- Squash and merge when approved
- Additional safety property calculators
- Alternative acquisition functions for MOBO
- Performance optimization for graph traversal
- Additional DWSIM thermodynamic models
- API reference improvements
- Tutorial notebooks
- Phase-specific guides
- Edge case coverage
- Property-based tests
- Performance benchmarks
- Open an issue for bugs or feature requests
- Use discussions for questions
- Tag maintainers for urgent items
Thank you for contributing! 🎉