Skip to content

Fix documentation and argument-parsing for thumbnails export#8301

Open
snooze92 wants to merge 2 commits intomarimo-team:mainfrom
snooze92:thumbnail_fixes
Open

Fix documentation and argument-parsing for thumbnails export#8301
snooze92 wants to merge 2 commits intomarimo-team:mainfrom
snooze92:thumbnail_fixes

Conversation

@snooze92
Copy link

📝 Summary

As discussed on Discord, I started by simply replacing marimo tools thumbnails generate with marimo export thumbnail in the relevant documentation pages (OpenGraph previews or Thumbnails).

Unfortunately, I found a more sneaky issue when trying to verify the passing of notebook arguments:

marimo export thumbnail notebook.py -- --foo 123

🔍 Description of Changes

The Markdown updates are very straightforward.

The support of notebook arguments took a while to get my head around! I have left a bunch of parameterised tests to show the complex way different binary choices we have to make interact with each other...

In short, we can allow interspersed arguments or not(+i / -i below), we can split paths out of the arguments or not (+s / -s below), but we can't support all 3 features:

Feature +i +s +i -s -i +s -i -s
Export options after path
Multiple paths
Notebook arguments

My initial commit uses _SPLIT_PATH_AND_ARGS and _ALLOW_INTERSPERSED_ARGS boolean flags to highlight where this is configured; as well as some illustrating tests.

I would recommend that we simplify by leaving interspersed arguments enabled, but removing the logic to split path and args. We would lose the ability to have multiple paths, but get the simplest solution possible, also the most consistent with other export commands.

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Tests have been added for the changes made.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Pull request title is a good summary of the changes - it will be used in the release notes.

@snooze92 snooze92 requested a review from akshayka as a code owner February 13, 2026 15:14
@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Feb 13, 2026 3:41pm

Request Review

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 13, 2026
@github-actions
Copy link

github-actions bot commented Feb 13, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@snooze92
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

There was a refactor where `marimo tools thumbnails generate` was
replaced with `marimo export thumbnail`. The documentation still
showed outdated example commands.

I also found a missing ``` which broke a lot of the page. Fixed
that as well.
Specifically for the thumbnails, special logic was used to support
multiple paths as arguments. Unfortunately, that logic broke when using
notebook arguments. Since `--` is not passed through by click when
interspersed args are allowed, and every argument is wrongly extracted
as a path.

In this commit, I knowingly include broken tests. I do not intend to
merge this as-is, but I will need the Marimo team input to decide how
we want to fix this. Those tests are there simply to illustrate the
discussion.

The two `_SPLIT_PATH_AND_ARGS` and `_ALLOW_INTERSPERSED_ARGS` are also
here purely for illustration. We should inline this once we decide for
one approach.

I also add two simple tests that should stay, to confirm that the kind
of examples from the documentation do run successfully.
@mscolnick
Copy link
Contributor

docs look great, thank you! i'll let @peter-gy chime in here regarding the split CLI arguments

@peter-gy peter-gy self-requested a review February 14, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants