Contributing¶
We welcome contributions to open-mlpipe! Here's how to get started.
Development Setup¶
Prerequisites¶
- Python 3.10+
- Git
Clone and Install¶
Verify Setup¶
Running Tests¶
# Run all tests
pytest
# Run with verbose output
pytest -v
# Run specific test file
pytest tests/test_pipeline.py
# Run only unit tests
pytest -m unit
# Run only integration tests
pytest -m integration
Code Quality¶
open-mlpipe uses ruff for linting and formatting:
Pre-commit Hooks¶
Project Structure¶
open-mlpipe/
├── src/open_mlpipe/ # Source code
│ ├── __init__.py # Public API
│ ├── cli.py # CLI entry point
│ ├── config/ # Configuration schemas
│ ├── core/ # Pipeline runner, context, stages
│ ├── stages/ # Individual pipeline stages
│ └── utils/ # Utility functions
├── tests/ # Test suite
├── configs/ # Example YAML configs
├── docs/ # Documentation source
└── examples/ # Example scripts
Adding a New Model¶
- Create a new file in
src/open_mlpipe/stages/or register in the model registry - Add the model configuration to the schema
- Add tests for the new model
- Update the documentation
Adding a New Stage¶
- Create a new stage class inheriting from
Stage - Register it in the stage registry
- Add configuration options to the schema
- Add tests
- Update documentation
Documentation¶
Documentation is built with MkDocs Material:
# Install docs dependencies
pip install mkdocs mkdocs-material mkdocstrings[python]
# Serve locally
mkdocs serve
# Build
mkdocs build
Writing Style¶
- Use clear, concise language
- Include code examples for every feature
- Keep API references auto-generated from docstrings
- Test all code examples before committing
Pull Request Process¶
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
pytest - Run linter:
ruff check . - Commit with a clear message
- Push and open a pull request
PR Guidelines¶
- One feature or fix per PR
- Include tests for new functionality
- Update documentation if needed
- Follow existing code style
- Keep commits focused and atomic
Reporting Issues¶
When reporting a bug, include:
- Python version (
python --version) - open-mlpipe version (
python -c "import open_mlpipe; print(open_mlpipe.__version__)") - Full error traceback
- Minimal code to reproduce the issue
- Operating system
Code of Conduct¶
Be respectful, inclusive, and constructive. We're all here to build great tools together.