Contributing¶
We welcome contributions to MOSAIC! This guide will help you get started.
Development Setup¶
# Clone the repository
git clone https://github.com/Abdulhamid97Mousa/mosaic.git
cd mosaic
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install core GUI + development dependencies
pip install -e ".[dev]"
# Run tests
pytest gym_gui/tests/
Code Style¶
Follow PEP 8 guidelines
Use type hints for all function signatures
Write docstrings in Google style
Maximum line length: 100 characters
Pull Request Process¶
Fork the repository
Create a feature branch:
git checkout -b feature/my-featureMake your changes
Run tests:
pytestSubmit a pull request
Adding a New Worker¶
See Integrated Workers for the worker architecture and existing worker implementations.
Create
3rd_party/myworker/directory withpyproject.tomlImplement the worker with an
InteractiveRuntimeclassAdd a CLI entry point (
myworker-worker)Support the JSON protocol:
reset,step,stopcommandsAdd tests
Create documentation under
docs/source/documents/architecture/workers/integrated_workers/
Adding a New Environment¶
Create an adapter in
gym_gui/core/adapters/Add a game config in
gym_gui/config/game_configs.pyAdd key combination resolver in
gym_gui/controllers/Register in
gym_gui/config/game_config_builder.pyAdd documentation under
docs/source/documents/environments/
Documentation¶
Build the docs locally:
cd docs
pip install -r requirements.txt
sphinx-build -b html source build/html
# Serve locally
cd build/html && python3 -m http.server 8765