Welcome to the MMORE developer documentation! This guide will help you set up your development environment and contribute to the project.
- Developer Documentation
Before installing MMORE for development, ensure you have the required system dependencies installed.
sudo apt update
sudo apt install -y ffmpeg libsm6 libxext6 chromium-browser libnss3 \
libgconf-2-4 libxi6 libxrandr2 libxcomposite1 libxcursor1 libxdamage1 \
libxext6 libxfixes3 libxrender1 libasound2 libatk1.0-0 libgtk-3-0 libreoffice \
libpango-1.0-0 libpangoft2-1.0-0 weasyprintNote: Note: On Ubuntu 24.04, replace
libasound2withlibasound2t64. You may also need to add the repository for Ubuntu 20.04 focal to have access to a few of the sources (e.g., create/etc/apt/sources.list.d/mmore.listwith the contentsdeb http://cz.archive.ubuntu.com/ubuntu focal main universe).
brew update
brew install ffmpeg chromium gtk+3 pango cairo \
gobject-introspection libffi pkg-config libx11 libxi \
libxrandr libxcomposite libxcursor libxdamage libxext \
libxrender libasound2 atk libreoffice weasyprintIf weasyprint fails to find GTK or Cairo, also run:
brew install cairo pango gdk-pixbuf libffi
uv pip install weasyprint1. Clone the repository:
git clone https://github.com/swiss-ai/mmore.git
cd mmore2. Create a virtual environment and install dependencies:
uv venv .venv
source .venv/bin/activate
uv pip install -e ".[all,cpu,dev]"GPU (CUDA 12.6): replace
cpuwithcu126- e.g.uv pip install -e ".[all,cu126,dev]"Partial install: replace
allwith only the stages you need - e.g.uv pip install -e ".[rag,cpu,dev]"for RAG only. Available stages:process,index,rag,api.
Important: This package requires many big dependencies and requires a dependency override, so it must be installed with
uvto handlepipinstallations. Check our tutorial on uv for more information.
MMORE uses several tools to maintain code quality and consistency.
We use pre-commit to automatically run code formatters and linters before each commit.
Setup
1. Install pre-commit (if not already installed):
uv pip install pre-commit2. Set up the git hook scripts:
pre-commit install3. Run the checks manually (optional but recommended before your first commit):
pre-commit run --all-filesConfigured Hooks
The pre-commit configuration runs ruff, a code formatter for consistent style
We use pyright for static type checking. Please ensure your Pull Requests are type-checked.
To run type checking manually:
pyrightWe welcome contributions! Here's how you can help:
- Bug Reports: Open an issue with a clear description, steps to reproduce, and expected vs. actual behavior
- Feature Requests: Open an issue describing the feature, its use case, and potential implementation approach
- Check the Issues page for ongoing work
- Fork the repository and create a new branch for your feature/fix
- Write clear, documented code following the existing style
- Add tests if applicable
- Ensure all pre-commit hooks pass
- Run type checking with
pyright - Submit a Pull Request with a clear description
mmore/ ├── mmore/ │ ├── process/ # Document processing pipeline │ │ ├── processors/ # Individual file type processors │ │ └── ... │ ├── postprocess/ # Post-processing utilities │ ├── index/ # Indexing and vector DB │ ├── rag/ # RAG implementation │ └── type/ # Type definitions and data models ├── docs/ # Documentation ├── examples/ # Example configurations and data ├── tests/ # Test suite ├── .pre-commit-config.yaml ├── pyproject.toml └── README.md
Key Modules
mmore.process: Handles extraction from various file formatsmmore.index: Manages hybrid dense+sparse indexing with Milvusmmore.rag: RAG system with LangChain integrationmmore.type: Core data structures likeMultimodalSample
pytest tests/- Place tests in the
tests/directory - Use descriptive test names
- Cover edge cases and error conditions
- Mock external dependencies when appropriate
- Update documentation if you're adding new features
- Add examples for new functionality
- Ensure all tests pass and pre-commit hooks succeed
- Update the changelog if applicable
- Request review from maintainers
- [] Code follows project style guidelines
- [] Pre-commit hooks pass (
pre-commit run --all-files) - [] Type checking passes (
pyright) - [] Tests added/updated as needed
- [] Documentation updated
- [] Examples provided for new features
- [] Commit messages are clear and descriptive
- Use
uv pipinstead ofpipfor all package installations - The project uses dependency overrides that are handled automatically by
uv - See the UV tutorial for more details
If you have questions about contributing, feel free to:
- Open a discussion on GitHub
- Reach out to the maintainers
- Check existing issues for similar questions
Thank you for contributing to MMORE! 🎉