jolly-midnight-72759
10/07/2020, 2:23 AMInteractiveProcess
, correct? All the interaction will be happening in the browser.
2. Does using run_in_workspace=True
make the most sense for making the target code accessible to the notebook or should I use a digest?hundreds-father-404
10/07/2020, 3:09 AMhundreds-breakfast-49010
10/07/2020, 6:32 AMInteractiveProcess
was created to support cases where a process that pants executes
needs non-cached, live access to the console - basically repls, and running a test in a mode where you can spawn pdb (which is itself sort of a repl). Process
on the other hand is designed for process whose results can be cachedhundreds-breakfast-49010
10/07/2020, 6:33 AMhundreds-breakfast-49010
10/07/2020, 6:34 AMhundreds-breakfast-49010
10/07/2020, 6:37 AM$ jupyter notebook
, which then starts a daemon running in your console, and opens up a page in your browser at localhost:<some port>
, presenting you with a file tree view of the local directory. then you pick whatever notebook you want to work with in the browser UI, and work with it there. the web page is talking back-and-forth with the daemon running live in your console, and the javascript will pop up some kind of warning and things will break if you kill that daemon but leave the page upjolly-midnight-72759
10/07/2020, 1:59 PMpants jupyter aioverlord/src/python/ownfb:spicymemes
. This will let us import the spicymemes
library and all its dependences as defined in the BUILD
file of the target. The Jupyter Notebook opens at the top of the repo (its root).hundreds-father-404
10/07/2020, 3:33 PMjolly-midnight-72759
10/07/2020, 4:28 PMpants
shutdown steps.jolly-midnight-72759
10/07/2020, 4:29 PMpants
be running while Jupyter Notebook is running.hundreds-father-404
10/07/2020, 4:34 PMInteractiveProcess
will work. I imagine that the deamon is in the background, but there is still a process in the foreground that is writing to the terminal, and that shutting down the foreground process shuts down the daemon.
That works well with Pants. InteractiveProcess
will run that foreground process for you, and then ctrl-c will shut down the foreground process and trigger Jupyter to clean up its daemon, iiuchundreds-father-404
10/07/2020, 4:35 PMrepl
goal, it will already set up the InteractiveProcess
for you. Otherwise, with your own Jupyter goal, you would set that up yourselfjolly-midnight-72759
10/07/2020, 4:59 PMcore/goals/repl.py
. If I do that, can I still make a custom goal so users can run pants jupyter
instead of pants repl --shell=jupyter
like they are used to doing now?jolly-midnight-72759
10/07/2020, 4:59 PM@goal_rule
decorated class if this can be accomplished.hundreds-father-404
10/07/2020, 5:01 PM@goal_rule