Skip to content

improvements to muutils.nbutils #45

@mivanit

Description

@mivanit

notebook to script conversion logistics

  • get script conversion to work with nested directories, maybe allow a pattern to be specified?
  • output is scripts which have to be run, and this doesn't hook up with testing frameworks. would be nice to add a utility which outputs a file along the lines of:
    def test_my_notebook():
        import converted_notebooks.my_notebook
    and thus gets everything in the notebook to run

plots

  • plot disabling logic should be moved to configure_notebook()
    • this requires the user to place it correctly (after imports) but that should be fine (perhaps there is a way to validate this?)
    • no need to do the super cursed thing where we modify the text of the file, which would be nice
    • requires configure_notebook() to
  • add options to configure_notebook() to:
    • keep plots enabled
    • force inline mode (so the figures show up in the saved notebook)
    • save figures to disk instead of rendering
      • by default as Figure_{n}.png, options to customize filetype
      • user can set a custom "current figure name", maybe by modifying some kind of global var? not sure how to do this. if it doesn't get changed at all for one iteration, revert to the Figure_{n}.png

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions