Thank you for your interest in contributing to py-run-mojo! This is a living experiment, evolving based on real-world usage.
- Additional notebook examples: More marimo notebooks demonstrating different use cases
- Performance profiling: Benchmarks on diverse hardware (different CPUs, GPUs, platforms)
- Integration: Support for other notebook environments (Jupyter, VSCode notebooks)
- Error handling: Better error messages, debugging workflows
- Documentation: Improved guides, tutorials, API references
- Testing: More comprehensive test coverage, especially integration tests
- Pattern library: Common use case patterns (data transformations, simulations, etc.)
# Clone the repository
git clone https://github.com/databooth/mojo-marimo
cd mojo-marimo
# Create virtual environment and install
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"
# Verify setup
python -m pytest tests/# Clone and install
git clone https://github.com/databooth/mojo-marimo
cd mojo-marimo
pixi install
# Verify setup
pixi run test-setup# Run all tests
pytest tests/
# Run with coverage
pytest tests/ --cov=src/py_run_mojo --cov-report=html
# Format code
ruff format .
# Lint
ruff check .
# Type check
uvx ty check# Run tests
pixi run test-all
# Format
pixi run format
# Lint
pixi run lint
# Type check
pixi run typecheck
# All checks
pixi run checkThis project uses:
- ruff for linting and formatting
- ty for type checking (10-100× faster than mypy)
- pytest for testing
Please ensure:
- All tests pass before submitting a PR
- Code is formatted with
ruff format - No linting errors from
ruff check - Type hints are added for new functions
Note that integration tests require mojo on your PATH:
# Verify mojo is available
mojo --version
# Run integration test
pytest tests/- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes
- Add tests if adding new functionality
- Run quality checks:
# uv ruff format . && ruff check . && uvx ty check && pytest tests/ # pixi pixi run check && pixi run test-all
- Commit with clear messages:
git commit -m "feat: add new feature description" - Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request
We follow conventional commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test additions or changesrefactor:- Code refactoringperf:- Performance improvementschore:- Maintenance tasks
To add a new notebook example:
-
Create the notebook in
notebooks/:import marimo app = marimo.App() @app.cell def __(): # Your example code here return
-
Add documentation to the notebook explaining:
- What the example demonstrates
- When to use this pattern
- Performance characteristics
-
Update the main README if adding a significant new pattern
- Use Australian English for all documentation and comments
- Keep code comments clear and concise
- Update relevant documentation when changing functionality
- Add docstrings to new functions following existing style
- Open an issue for questions or discussions
- Reach out via databooth.com.au/about
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.