I've seen that repl now supports `IPython` (super ...
# general
r
I've seen that repl now supports
IPython
(super cool btw), are there any plans to then support a repl with a jupyter notebook ?
h
Indeed it does! V1 did too, btw. In V1, you would set
--repl-py-ipython
. In V2, you set
--repl-shell='ipython'
(subject to change - this doesn’t scale great when you have multiple languages)
are there any plans to then support a repl with a jupyter notebook
Yes, it is on the roadmap. A really important audience we want Pants to serve well is data science. I can’t speak for the other orgs who work on Pants, but it’s not in Toolchain’s roadmap for the next month. Closer to next 2-4 months, I’d say. We’d also be eager to pair with anyone who wanted to contribute jupyter support
👍 1
h
What Eric said. We want to support jupyter, we just need a better understanding of what that should look like...
👍 1
r
my simple try was to create a binary with
jupyter
and my
python_library
as dependencies:
Copy code
python_binary(
    name='notebook',
    dependencies = [
        'packages-python-pants/3rdparty:jupyter',
        'packages-python-pants/package'
    ],
    sources=['notebook.py'],
)
and with.
notebook.py
containing:
Copy code
import sys

from notebook.notebookapp import main


if __name__ == "__main__":
    sys.exit(main())
it. correctly starts a notebook server, and I can create or open Ipython notebooks, but my dependency is not in sys.path 😞
h
When you run something like
./pants jupyter ::
, would you expect Pants to continue running or to start the server and then exit? Would you expect Pants to have hot reloading, i.e. to reload the notebook when you make changes to your repo?
*expect and/or like to see
r
• I'd expect pants to continue running till the server is closed, assuming that I can still run pants for other stuff in another terminal? • Yes a hot reload would be the best or a way to manually reload the notebook? normally when I make changes to some local package and reinstall (if not already using it in
-e
mode), I just use the
Restart
button of the notebook, to get the last installed version of my local package
h
I’d expect pants to continue running till the server is closed, assuming that I can still run pants for other stuff in another terminal?
Cool, to confirm, you’d be fine with it taking over the terminal, so long as you can have other terminals open, correct?
I just use the Restart button of the notebook
Oh, interesting. If you could choose, would you rather have automatic hot reloading or manual reloading that you must trigger, e.g. by pressing the Restart button? A restart completely wipes the session, right? So, automatic hot reloading would mean that something as simple as changing white space to your repo would cause your entire session to be wiped 😬
r
> Cool, to confirm, you’d be fine with it taking over the terminal, so long as you can have other terminals open, correct? To make it simple, I'd expect the usual jupyter behavior and output, to stay in line with the ecosystem already in place
👍 1
For the second point also I would also prefer to stay in line with the usual jupyter behavior and have manual reloading
👍 1