Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Common headers for python script cells #48

Open
okennedy opened this issue Sep 16, 2019 · 0 comments
Open

Common headers for python script cells #48

okennedy opened this issue Sep 16, 2019 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@okennedy
Copy link
Collaborator

Current behavior: Each python cell gets a fresh interpreter and is prefixed with a hardcoded setup script (e.g., to initialize the vizierdb variable, bokeh, etc...).

Desired behavior: Allow users to provide custom setup code to be run in each cell (e.g., to avoid the mountain of from X import Y statements that will end up getting copied into each cell)

Topics for discussion:

  • How does this setup code interact with dependencies? Presumably, changing this cell would require re-running ALL existing python cells.
  • Maybe instead of a generic, turing-complete header, we simply let the user specify a list of desired includes. E.g., As part of the notebook configuration, we have a list of from X import Y. As long as there is no name collision, this should (I think) be side-effect free.
@okennedy okennedy added enhancement New feature or request good first issue Good for newcomers labels Sep 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant