Contributing
Thank you for your interest in contributing to GGE!
Development Setup
-
Clone the repository:
-
Install in development mode:
-
Install pre-commit hooks:
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=gge
# Run specific test file
pytest tests/test_metrics.py
# Run with verbose output
pytest -v
Code Style
We use: - black for code formatting - isort for import sorting - flake8 for linting - mypy for type checking
# Format code
black src/ tests/
isort src/ tests/
# Check linting
flake8 src/ tests/
# Type check
mypy src/
Pull Request Process
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Update documentation if needed
- Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
Adding New Metrics
- Create a new metric class in
src/gge/metrics/:
from gge.metrics.base_metric import BaseMetric, MetricResult
class MyNewMetric(BaseMetric):
name = "my_metric"
higher_is_better = True # or False
def _compute_per_gene(self, real, generated):
# Implement per-gene computation
return per_gene_values
- Add to
src/gge/metrics/__init__.py - Add tests in
tests/test_metrics.py - Update documentation
Adding New Visualizations
- Add method to
src/gge/visualization/visualizer.py - Add tests in
tests/test_visualization.py - Update documentation
Reporting Issues
When reporting issues, please include:
- GGE version (gge --version)
- Python version
- Operating system
- Minimal reproducible example
- Full error traceback
Questions?
Feel free to open an issue or discussion on GitHub!