Thank you for your interest in contributing to Marimo Flow! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Code Standards
- Testing
- Pull Request Process
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/marimo-flow.git cd marimo-flow - Add upstream remote:
git remote add upstream https://github.com/bjoernbethge/marimo-flow.git
- Python 3.11 or higher
- uv package manager (recommended)
- Docker (optional, for containerized development)
# Install all dependencies including dev tools
uv sync --all-extras
# Or using pip
pip install -e ".[dev,full]"# Terminal 1: Start MLflow server
uv run mlflow server --host 0.0.0.0 --port 5000 \
--backend-store-uri sqlite:///data/mlflow/db/mlflow.db \
--default-artifact-root ./data/mlflow/artifacts
# Terminal 2: Start Marimo
uv run marimo edit examples/# Build and start services
docker-compose up -d
# Access services
# Marimo: http://localhost:2718
# MLflow: http://localhost:5000Use descriptive branch names:
feature/add-new-example- New featuresfix/mlflow-connection- Bug fixesdocs/update-readme- Documentation updatesrefactor/cleanup-snippets- Code refactoring
Follow conventional commits format:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples:
feat(examples): add hyperparameter tuning notebook
Add new example demonstrating Optuna integration with MLflow
for automated hyperparameter optimization.
fix(mlflow): resolve tracking URI connection issue
Update MLflow client initialization to properly handle
environment variables and default configurations.
- Formatter: Ruff (
ruff format .) - Linter: Ruff (
ruff check --fix .) - Type Checker: MyPy
- Docstrings: Google style
Run formatting and linting:
# Format code
uv run ruff format .
# Lint and auto-fix
uv run ruff check --fix .
# Type check
uv run mypy .- Progressive Structure: Examples should build on previous notebooks
- Interactive Elements: Use
mo.uicomponents for parameters - Documentation: Include clear markdown cells explaining concepts
- MLflow Integration: Track relevant experiments and metrics
- Reproducibility: Set random seeds where applicable
# Good: Clear imports, type hints, docstrings
import marimo as mo
import mlflow
from typing import Dict, List
def train_model(params: Dict[str, float]) -> float:
"""Train a model with given parameters.
Args:
params: Dictionary of hyperparameters
Returns:
Model accuracy score
"""
with mlflow.start_run():
# Implementation
pass# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=marimo_flow
# Run specific test file
uv run pytest tests/test_examples.py- Place tests in
tests/directory - Name test files
test_*.py - Use descriptive test function names
def test_example_notebook_executes():
"""Test that example notebook runs without errors."""
# Test implementation
pass-
Update from upstream:
git fetch upstream git rebase upstream/main
-
Run quality checks:
# Format uv run ruff format . # Lint and auto-fix uv run ruff check --fix . # Type check uv run mypy . # Tests uv run pytest
-
Update documentation: If adding features, update README.md
-
Push to your fork:
git push origin feature/your-feature-name
-
Create PR on GitHub with:
- Clear title describing the change
- Description of what changed and why
- Link to related issues (if applicable)
- Screenshots/examples (for UI changes)
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
## Testing
Describe how you tested your changes
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] Tests added/updated
- [ ] All tests passNew example notebooks should:
- Fit the progressive learning structure (01-03)
- Demonstrate practical ML workflows
- Include MLflow tracking
- Be well-documented with markdown cells
- Follow existing naming conventions
- Fix typos or unclear explanations
- Add code examples
- Improve setup instructions
- Translate documentation
Use GitHub Issues with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Python version)
- Relevant logs/screenshots
Open a GitHub Issue describing:
- The problem your feature solves
- Proposed solution
- Alternative approaches considered
- Example use cases
- Open a GitHub Issue for questions
- Check existing issues and discussions
- Review documentation in
docs/directory
Contributors will be acknowledged in:
- CHANGELOG.md
- GitHub contributors page
- Release notes (for significant contributions)
Thank you for contributing to Marimo Flow!