Contributing to MDOToolbox
Thank you for your interest in contributing to MDOToolbox! This guide covers the development setup, testing workflow, and contribution process.
Development Setup
- Clone the repository:
git clone https://github.com/moebehfn/mdotoolbox.git
cd mdotoolbox
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install in editable mode with test dependencies:
pip install -e ".[test]"
Running Tests
We use pytest for testing. The configuration is in pyproject.toml.
Fast suite (skips slow GP training and full BACO iterations):
pytest -m "not slow"
Full suite:
pytest
Specific test file:
pytest tests/test_regression.py -v
The slow marker is used for tests that train real Gaussian Process models or run full BACO
optimization iterations.
Code Style
- Follow PEP 8 conventions.
- Use type hints for function signatures.
- Maintain consistency with existing code's naming conventions (e.g.,
zfor shared variables,yfor coupling variables).
Project Structure
| Directory | Contents |
|---|---|
src/mdotoolbox/ |
Core library source code |
docs/ |
Documentation source (MkDocs) |
License
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.