Open amit1rrr opened 4 years ago
Hi, I am trying to build this feature for quite some time. If You could answer some of the queries that will be helpful.
treon --partial
. pip
package containing some magic functions and using those magic functions we can run notebook partially(skipping cells). Later On, That pip
package can be installed with treon as well. So, without treon --partial
, We will be able to run notebook partially.
What's your take on both thought process? & How personally think we can achieve this? @merrcury Thanks for helping on this. Here's my thought process,
There needs to be a front end Jupyter extension to capture which cells to ignore. This can be a separate package (will be published to npm). You'll have to decide which Jupyter version to support (classic Jupyter or JupyterLab or both).
Whichever cells are tagged would have some metadata added to them e.g. "ignore": true
Once the above two are in place then we can implement treon --partial
which would run all the cells except the ones marked with ignore tag.
Hope that helps think through this better.
@amit1rrr Frontend Extensions seems to be the right path for the treon --partial
.
For the jupyter version, I guess I'll want to add support for both versions as some online Notebooks like Azure Notebooks(supports jupyter extensions) is available in classic Jupyter.
Executing entire notebook is a "good" CI practice. But it's not always feasible or required (some cells can take hours to run). It would be good to offer an ability to only run specific cells or exclude specific cells. Which cells to run / ignore can be specified with tags.
This whole partial execution can be wrapped as a new treon cmdline flag (e.g.
treon --partial
). We'd still want the standard mode to execute complete notebooks top to bottom.