Contributing to OmniDocs
Thank you for your interest in contributing to OmniDocs! 🎉
Development Setup
-
Clone the repository:
-
Install dependencies with uv:
-
Run tests:
Project Structure
Omnidocs/
├── omnidocs/ # Main package
│ ├── document.py # Document loading (✅ complete)
│ ├── tasks/ # Task extractors (🚧 in progress)
│ ├── inference/ # Backend implementations (planned)
│ └── utils/ # Utilities
├── tests/ # Test suite
│ ├── fixtures/ # Test data (PDFs, images)
│ └── tasks/ # Future task tests
└── docs/ # Documentation
Design Documents
🔴 IMPORTANT: Before implementing any new features, read the design documents:
- docs/architecture.md - Backend and config system
- docs/developer-guide.md - API design and usage patterns
These documents define the architecture for v0.2+.
Development Workflow
1. Testing Phase (modal_scripts/)
- Test models in isolation using Modal scripts
- Validate inference and outputs
- Benchmark performance
2. Integration Phase (omnidocs/)
- Follow the config pattern (single-backend vs multi-backend)
- Use Pydantic for all configs and outputs
- Maintain consistent
.extract()API - Add comprehensive tests
3. Documentation
- Add docstrings (Google style)
- Update relevant docs
- Add usage examples
Code Standards
✅ Required
- Type hints for all public APIs
- Pydantic models for configs (
extra="forbid") - Docstrings (Google style) for classes and methods
- Tests with >80% coverage
❌ Avoid
- String-based factories (use class imports)
- Storing task results in Document
- Breaking changes without deprecation
- Adding features beyond requirements
- Over-engineering
Version Management
OmniDocs follows Semantic Versioning: - MAJOR (X.0.0): Breaking API changes - MINOR (0.X.0): New features, backward compatible - PATCH (0.0.X): Bug fixes, backward compatible
Incrementing Version
Version is managed in one place: omnidocs/_version.py
The pyproject.toml reads from this file dynamically, so you only need to update one file.
Version Bump Process
-
Update version:
-
Verify (version should be accessible everywhere):
-
Commit:
-
Tag and release (maintainers only):
This will trigger the GitHub Actions workflow to: - Build the package - Create a GitHub release - Publish to PyPI
When to Bump
- Patch (0.2.X): Bug fixes, typos, documentation
- Minor (0.X.0): New features, new task extractors, new models
- Major (X.0.0): Breaking API changes (rare, requires discussion)
Documentation
OmniDocs uses MkDocs Material for documentation.
Building Docs Locally
# Install docs dependencies
uv sync --group docs
# Serve docs with live reload
uv run mkdocs serve
# Open http://127.0.0.1:8000 in your browser
Building Static Site
# Build static site to site/ directory
uv run mkdocs build
# Build with strict mode (warnings become errors)
uv run mkdocs build --strict
Documentation Structure
docs/
├── README.md # Homepage (also serves as package README)
├── architecture.md # Backend and config system design
└── developer-guide.md # API design and usage patterns
Automatic Deployment
Documentation is automatically built and deployed to GitHub Pages when:
- Code is pushed to the master branch
- A maintainer manually triggers the workflow
The docs are published at: https://adithya-s-k.github.io/OmniDocs/
Adding New Documentation
- Create markdown files in
docs/ - Update
mkdocs.ymlnav section to include new pages - Use Google-style docstrings in code (automatically extracted)
- Preview changes locally with
uv run mkdocs serve
Pull Request Process
-
Create a branch:
-
Make changes:
- Follow the design patterns in docs/
- Add tests for new functionality
-
Update relevant documentation
-
Run tests:
-
Submit PR:
- Provide clear description
- Reference any related issues
- Ensure tests pass
Commit Guidelines
Follow conventional commits:
feat: add DocLayoutYOLO extractor
fix: resolve page range validation
docs: update architecture guide
test: add fixture-based PDF tests
Need Help?
- 📖 Read the design documents
- 🐛 Open an issue
- 💬 Ask questions in discussions
License
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.