Skip to content

jupyter V2.1 with backwards compatible changes#917

Merged
zilto merged 8 commits intomainfrom
plugins/jupyter-v2.1
May 28, 2024
Merged

jupyter V2.1 with backwards compatible changes#917
zilto merged 8 commits intomainfrom
plugins/jupyter-v2.1

Conversation

@zilto
Copy link
Contributor

@zilto zilto commented May 23, 2024

Reimplementation of #846 with backwards compatible changes with V1.

Compared to V2:

  • support module_name as positional or named arg (-m/--module_name)
  • support -c/--config
  • support -h/--help
  • ignores -r/--rebuild-drivers
  • ignores -v/--verbose
  • richer support for -c/--config
  • alias %%insert_module to %%module_to_cell
  • creates a temporary file for the temporary modules to play nicely with Hamilton UI

Currently ignores the %%incr_cell_to_module. We have to consider what it means to deduplicate these 100+ lines of logic. If this feature truly adds value, it should be an argument instead of a separate magic. I propose -a/--append INDEX. This means the magic would now require to be stateful though opening opportunities for more bugs.

How I tested this

The notebook tutorial.ipynb covers all implemented functionalities, so it's a good test for intended behavior.

TODO

  • Manually test all notebooks using %%cell_to_module
  • Reimplement the 2 notebooks currently using %%incr_cell_to_module
  • Update documentation

@zilto zilto added enhancement New feature or request examples Related to code under `examples/` plugin Relates to a Hamilton plugin (adapters, materializers, etc.) labels May 23, 2024
@zilto zilto requested a review from skrawcz May 23, 2024 19:29
@zilto zilto mentioned this pull request May 23, 2024
7 tasks
@sweep-ai-deprecated

This comment was marked as off-topic.

Copy link
Contributor

@skrawcz skrawcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, but undelete %incr_cell_to_module

Co-authored-by: Stefan Krawczyk <stefan@dagworks.io>
@zilto zilto requested a review from skrawcz May 25, 2024 14:33
Copy link
Contributor

@skrawcz skrawcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I assume you've tested it, e.g. %incr_cell_to_module still works? :)

@skrawcz
Copy link
Contributor

skrawcz commented May 28, 2024

Cool - I'd squash merge this PR when it's ready.

@zilto zilto merged commit 831a093 into main May 28, 2024
@zilto zilto deleted the plugins/jupyter-v2.1 branch May 28, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request examples Related to code under `examples/` plugin Relates to a Hamilton plugin (adapters, materializers, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants