HERA-Team / hera_notebook_templates

Repository for HERA analysis / real-time pipeline notebooks and related support code
MIT License
0 stars 0 forks source link

Runscript #43

Closed steven-murray closed 1 year ago

steven-murray commented 1 year ago

This adds a nifty click-based CLI that runs the notebooks in this repo. It can auto-find them (once they're put into the package, rather than top-level notebooks/ dir), and detect their parameters to pass through on CLI.

The benefits of this are:

  1. makeflow do-scripts don't have to set a path to the repo, the repo just has to be installed into the conda env you're using, and they're all available.
  2. This uses papermill to run the notebooks, which is a little nicer than nbconvert -- it displays a progress bar of which cell is running, and also auto-saves notebooks every few seconds so that if they crash, you can load it up and debug.
  3. You don't need to set env variables to set parameters, just pass them like command-line parameters.

I've only added the lstbin-inspect notebook so far, because I didn't want to move anything that would break pipelines. Other notebooks can be moved over time.

This PR also has a couple of updates to the lstbin-inspect notebook which I've been running as tests of this script.

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB