-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds incremental module creator to magic (#883)
* Adds incremental module creator to magic The idea is simple. Allow one to build up a module easily and quickly. This is useful when explaining a concept. Example use: ``` %%incr_cell_to_module -m doc_pipeline -i 5 --display ``` The idea is that you can partition creating a module over multiple cells. The ONLY CAVEAT is that you maintain a unique identifier (int or string) for each cell so that they can are distinct; i.e. it's possible to override an earlier cell if you use the same identifier. Note: we use the sorted set of identifiers and build the module up in order of that. This is probably an unused feature, since we expect most people to logically increment the identifier and order things correctly top to bottom. There are some utility methods to help reset state. Otherwise I duplicate some logic, since it wasn't easy to refactor. I centralized logic where it made sense, and then removed rebuild drivers from incremental -- we can always add it in. * For incremental makes module name required Propagates that to other functions.
- Loading branch information
Showing
1 changed file
with
148 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters