This guide helps you migrate between major versions of Marimushka.
Version 0.3.x introduces significant security enhancements, performance improvements with parallel exports, and watch mode support. This release maintains backward compatibility for most use cases.
Version 0.3.x maintains backward compatibility with 0.2.x. All existing commands and configuration should work without changes.
Impact: Significantly faster export times for projects with multiple notebooks.
Before (0.2.x):
uvx marimushka export
# Sequential export: ~30s for 10 notebooksAfter (0.3.x):
uvx marimushka export --parallel --max-workers 4
# Parallel export: ~8s for 10 notebooks (default behavior)Migration:
- Parallel export is enabled by default
- To use sequential export (old behavior):
uvx marimushka export --no-parallel - Adjust workers if needed:
uvx marimushka export --max-workers 8
New capability: Automatically re-export notebooks on file changes.
# Install watch dependencies
uv add marimushka[watch]
# Start watch mode
uvx marimushka watchUse cases:
- Development workflow with live preview
- Continuous documentation updates
- Real-time notebook testing
What changed:
- Path traversal protection
- TOCTOU race condition prevention
- DoS protections (file size limits, timeouts)
- Audit logging support
Migration:
- Enable audit logging (optional):
# .marimushka.toml [marimushka.security] audit_enabled = true audit_log = ".marimushka-audit.log"
- Review security settings in
.marimushka.toml.example - No action required for basic usage
New capability: .marimushka.toml configuration file.
Before (0.2.x):
# All configuration via CLI flags
uvx marimushka export --notebooks notebooks --apps apps --output _site --sandboxAfter (0.3.x):
# .marimushka.toml (create once)
[marimushka]
notebooks = "notebooks"
apps = "apps"
output = "_site"
sandbox = true
parallel = true
max_workers = 4
[marimushka.security]
audit_enabled = true
max_file_size_mb = 10# CLI becomes simpler
uvx marimushka exportMigration steps:
- Copy
.marimushka.toml.exampleto.marimushka.toml - Customize settings for your project
- Remove redundant CLI flags
- Configuration precedence: CLI > config file > defaults
None in this release.
| Scenario | 0.2.x | 0.3.x | Improvement |
|---|---|---|---|
| 10 notebooks | ~30s | ~8s | 3.75x faster |
| 50 notebooks | ~150s | ~40s | 3.75x faster |
| Large notebook (5MB) | ~12s | ~12s | No change |
Note: Performance gains scale with the number of notebooks, not individual notebook size.
No breaking API changes. New optional parameters added:
from marimushka.export import main
# New parameters (all backward compatible)
main(
parallel=True, # NEW: Enable parallel export (default: True)
max_workers=4, # NEW: Number of workers (default: 4)
timeout=300, # NEW: Export timeout in seconds (default: 300)
)- uses: jebel-quant/marimushka@v0.2.3
with:
notebooks: 'notebooks'
apps: 'apps'- uses: jebel-quant/marimushka@v0.3.0
with:
notebooks: 'notebooks'
apps: 'apps'
# NEW optional inputs:
parallel: 'true' # Enable parallel export (default)
max-workers: '4' # Number of workersNo changes required; new inputs are optional.
Solution:
# Reduce worker count
uvx marimushka export --max-workers 2Or in .marimushka.toml:
[marimushka]
max_workers = 2Solution:
# Install watch dependencies
uv add marimushka[watch]
# Or with pip
pip install 'marimushka[watch]'Solution: Disable audit logging or use log rotation:
[marimushka.security]
audit_enabled = falseVersion 0.2.x introduced Rhiza framework integration, improved project structure, and sandbox mode by default. This was a significant architectural upgrade.
Change: Sandbox mode is now enabled by default.
Before (0.1.x):
uvx marimushka export
# Used local environment by defaultAfter (0.2.x):
uvx marimushka export
# Uses sandbox mode by defaultMigration:
- Ensure notebooks declare dependencies in
/// scriptmetadata:# /// script # dependencies = ["pandas", "matplotlib"] # /// import pandas as pd import matplotlib.pyplot as plt
- To use old behavior:
uvx marimushka export --no-sandbox - Recommended: Migrate to sandbox mode for better reproducibility
Change: Rhiza framework integration changed directory layout.
Before (0.1.x):
project/
├── notebooks/
├── apps/
└── output/
After (0.2.x):
project/
├── notebooks/
├── apps/
├── notebooks_wasm/ # NEW: Interactive notebooks
├── book/ # NEW: Documentation
└── _site/ # Default output
Migration:
- Create
notebooks_wasm/for interactive notebooks (optional) - Update output path if using custom location
- No breaking changes to existing structure
Removed commands: None
New commands:
uvx marimushka version # NEW: Show versionBefore (0.1.x):
# Only static notebooks and apps
uvx marimushka export --notebooks notebooks --apps appsAfter (0.2.x):
# Add interactive editable notebooks
uvx marimushka export \
--notebooks notebooks \
--notebooks-wasm notebooks_wasm \
--apps appsUse case: Share notebooks that users can edit and run in their browser.
What changed:
- Standardized development workflow
- Unified Makefile-based commands
- Automated dependency management
- Better CI/CD integration
Migration: If you're developing Marimushka locally:
# Old way (0.1.x)
python -m venv venv
source venv/bin/activate
pip install -e .
# New way (0.2.x)
make install # Uses uv, creates .venv automaticallyBefore (0.1.x):
- uses: jebel-quant/marimushka@v0.1.9
with:
notebooks_dir: 'notebooks'After (0.2.x):
- uses: jebel-quant/marimushka@v0.2.0
with:
notebooks: 'notebooks' # Renamed
apps: 'apps'
notebooks_wasm: 'interactive' # NEWMigration: Update input names in workflows.
Deprecated: notebooks_dir (0.1.x)
Replaced by: notebooks (0.2.x)
# Old (deprecated but still works)
- uses: jebel-quant/marimushka@v0.2.0
with:
notebooks_dir: 'notebooks'
# New (recommended)
- uses: jebel-quant/marimushka@v0.2.0
with:
notebooks: 'notebooks'| Scenario | 0.1.x | 0.2.x | Improvement |
|---|---|---|---|
| First export | ~5s | ~3s | 1.67x faster |
| Template rendering | ~500ms | ~200ms | 2.5x faster |
No breaking API changes. Sandbox mode parameter added:
from marimushka.export import main
# New parameter (backward compatible)
main(
notebooks="notebooks",
apps="apps",
sandbox=True, # NEW: Enable sandbox mode (default: True)
)Cause: Sandbox mode requires dependencies in notebook metadata.
Solution: Add dependencies to notebook:
# /// script
# dependencies = ["pandas>=2.0", "numpy"]
# ///
import pandas as pd
import numpy as npOr disable sandbox:
uvx marimushka export --no-sandboxCause: Input names changed.
Solution: Update workflow file:
# Change 'notebooks_dir' to 'notebooks'
- uses: jebel-quant/marimushka@v0.2.0
with:
notebooks: 'notebooks' # UpdatedCause: Rhiza framework requires make for development.
Solution:
# Ubuntu/Debian
sudo apt-get install build-essential
# macOS
xcode-select --install
# Windows (use WSL or Git Bash)Always test migrations in a branch before updating production:
git checkout -b test-migration
# Test new version
git checkout main # Revert if neededEnable verbose logging during migration:
export MARIMUSHKA_LOG_LEVEL=DEBUG
uvx marimushka exportFor multi-version jumps (e.g., 0.1.x → 0.3.x):
- Update to 0.2.x first
- Test thoroughly
- Then update to 0.3.x
Preserve your configuration between updates:
.marimushka.toml- Project settingstemplates/*.html.j2- Custom templates
Always check CHANGELOG.md for detailed release notes.
- Documentation: README.md
- API Reference: API.md
- Issues: https://github.com/jebel-quant/marimushka/issues
- Discussions: https://github.com/jebel-quant/marimushka/discussions
| Version | Status | Support Until |
|---|---|---|
| 0.3.x | ✅ Current | Active |
| 0.2.x | ✅ Supported | Until 0.4.0 |
| 0.1.x | Upgrade recommended |