Get help from the marimo community

Updated 2 weeks ago

Doc strings and intellisense for cells imported into python files

I am developing a workflow that involves writing functions in marimo notebooks (with examples and pytests leveraging https://github.com/marimo-team/marimo/pull/3892) and then I make these functions available to 'normal' python by using a simple helper module e.g.
Plain Text
from foo_notebook import basic_defs
_, defs = basic_defs.run() # basic_defs is a mo.Cell

count_mins = defs['count_mins']
#etc...


This flow is quite great -- debugging works fine (I can set a break point in the marimo notebook and when debugging, the breakpoint works), vscode can find the unit tests, importing is snappy (ignores demo content), etc

The only thing I loose is IDE awareness of docstrings and (more importantly) parameter names, arity and type. Jupyter intellisense is not too bad since it pulls info from kernel runtime and so can see the docstring and parameter info, but normal IDE flows don't work. What worse is the AI completion starts making wild guesses.

Are there any suggestions for how to make this work better? I was thinking if I continue with this flow, maybe building a helper generator that calls writes stubs with parameters and docstrings and then delegates to the cell, but this seems quite suboptimal....
A
1 comment
Awesome! A better experience for this, which will bring you ide awareness, is coming:

https://github.com/marimo-team/meps/pull/8

cc @dmad
Add a reply
Sign up and join the conversation on Discord