ploomber / soorgeon

Convert monolithic Jupyter notebooks 📙 into maintainable Ploomber pipelines. 📊
https://ploomber.io
Apache License 2.0
78 stars 20 forks source link

support for magics v2 #34

Open edublancas opened 2 years ago

edublancas commented 2 years ago

We recently introduced support for magics: we comment the lines that are line, cell magics, or inline shell commands.

e.g.,:

%timeit something()

%cd stuff

! echo hello

This works fine in many cases, however, it'll break under others since we're ignoring the arguments passed to the magic. This arguments may contain variables that the given section should use as inputs:

# should consider x and y inputs for this node
%timeit x + y
# should consider x as input
 ! echo $x