Is there a way running a jupyter notebook python cell with command line parameters retaining the whole variable visibility of a notebook?
What I tried:
- According to this discussion I prefixed my script with
%%python - --option1 value1 - -option2 value2 - -etc
but this only runs it as a normal python script. No variables visible, no notebook interaction. - papermill adresses this issue but relies on tags not available in VS code.
- export as normal py script ... of course this works but is cumbersome in the development process
- hardcoding default values in argpare ... but again this is an ugly way as I keep altering code which shouldn't be changed when debugging.
I'm aware of this discussion also not coming to a clean general solution.