https://pantsbuild.org/ logo
#general
Title
# general
r

rapid-crayon-8232

04/15/2020, 5:34 PM
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

hundreds-father-404

04/15/2020, 5:39 PM
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

happy-kitchen-89482

04/15/2020, 7:09 PM
What Eric said. We want to support jupyter, we just need a better understanding of what that should look like...
👍 1
r

rapid-crayon-8232

04/15/2020, 7:34 PM
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

hundreds-father-404

04/15/2020, 7:36 PM
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

rapid-crayon-8232

04/15/2020, 7:51 PM
• 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

hundreds-father-404

04/15/2020, 7:54 PM
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

rapid-crayon-8232

04/15/2020, 7:57 PM
> 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
5 Views