First off, thank you for considering contributing to OMOPHub!
Before creating bug reports, please check the existing issues to avoid duplicates.
When creating a bug report, please include:
- Python version (
python --version) - SDK version (
pip show omophub) - Operating system
- Minimal code example that reproduces the issue
- Full error traceback
- Expected vs actual behavior
Feature requests are welcome! Please open an issue with:
- Clear description of the feature
- Use case: why would this be useful?
- Possible implementation approach (optional)
- Fork the repository and create your branch from
main - Install development dependencies:
git clone https://github.com/YOUR_USERNAME/omophub-python.git cd omophub-python pip install -e ".[dev]"
- Make your changes with clear, descriptive commits
- Add tests for new functionality
- Run the test suite:
pytest
- Ensure code style compliance:
ruff check . ruff format . mypy src/
- Update documentation if needed
- Submit a pull request with a clear description
- Python 3.10+
- pip
# Clone your fork
git clone https://github.com/YOUR_USERNAME/omophub-python.git
cd omophub-python
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"# Run all tests
pytest
# Run with coverage
pytest --cov=omophub --cov-report=html
# Run specific test file
pytest tests/test_concepts.py
# Run tests matching a pattern
pytest -k "test_search"We use:
- Ruff for linting and formatting
- mypy for type checking
# Check linting
ruff check .
# Auto-format code
ruff format .
# Type checking
mypy src/omophub-python/
├── src/omophub/
│ ├── __init__.py # Public API exports
│ ├── client.py # OMOPHub client class
│ ├── resources/ # API resource classes
│ │ ├── concepts.py
│ │ ├── search.py
│ │ ├── hierarchy.py
│ │ └── ...
│ ├── types.py # TypedDict definitions
│ └── exceptions.py # Custom exceptions
├── tests/
│ ├── test_concepts.py
│ ├── test_search.py
│ └── ...
├── examples/
│ └── ...
└── pyproject.toml
We follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation changestest:Adding or updating testsrefactor:Code refactoringchore:Maintenance tasks
Examples:
feat: add semantic search endpoint
fix: handle rate limit errors correctly
docs: update README with new examples
test: add tests for batch concept lookup
- Open a GitHub Discussion
- Email: support@omophub.com
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make OMOPHub better!