Live data from Hacker News

JupyterLab 4.0

blog.jupyter.org

121–130 of 199 posts

Re: JupyterLab 4.0

#121

What’s the current best-practice workflow for using with git? I see jupytext discussed in the comments but this saves the .py exported file. Is there a good clean method for storing tbe .ipynb files into git? It maybe is easier without the cell outputs?

Jupytext seems the best practice.

The ipynb files are output artifacts. Why would you want to store them into git? It would be like storing compiled program binaries.

Re: JupyterLab 4.0

#123
post #104

Earlier quoted context omitted.

I just do a venv inside the venv so I can target several Python versions. I also use Jupiter for C#, Clojure, and Julia. I wish the Clojure integration was as good as the others I listed. I’m to the point now where if anything other than venv/pip is required I won’t use it. Unfortunately there are many things that insist on conda.

Conda is a fucking nightmare. Luckily you can usually just use pip to get the same packages.

Why does “pip install gcc” keep failing then? ;)

Conda isn’t perfect but takes on a lot of problems that pip doesn’t deal with at all. Regular conda is really slow these days but you can use mamba instead or just configure conda to use the libmamba solver and it’s much nicer.

The folks at prefix.dev seem to be building some pretty cool drop in replacements for conda too.

Re: JupyterLab 4.0

#124
post #45

I've been using Jupyter Notebooks for 7+ years but keep failing to find a use case for JupyterLab. JupyterLab feels like a clunky web based IDE. I check it every year or so and go back to Notebooks. I used to and still run a Littlest Jupyter Hub: https://tljh.jupyter.org/en/latest/ for my org. I keep thinking whether migrating to full blown JupyterLab is worth the pain. With the improvements that Visual Studio Code h…

Same here. JupyterLab is just too overwhelming and full of things I don't need. I just need an interactive Python interpreter with support for visualizations and editing code blocks. That's Jupyter Notebook, so I keep using that.

Re: JupyterLab 4.0

#125

I have been using VSCode notebooks with .ipynb file extensions, this gives me many advantages as I am able to configure things I'm not able in JupyterLab. I also have access to a very rich ecosystem of plugins. If there is anyone aware of VSCode as a solution but keeps using JupyterLab, could they explain why?

I've not been back to full-fledged Jupyter since getting in to VSCode. Most of my analytical work now is done in .py files, broken up into blocks with `#%%`. Real notebooks feel really clunky since adopting the approach.

I must be missing something because I am not immediately seeing the value-add. Do you prefer the separation of input/output or is it something else. I believe all of the debug, extensions, and hinting work the same as the standard notebook.

Re: JupyterLab 4.0

#126

Earlier quoted context omitted.

I've not been back to full-fledged Jupyter since getting in to VSCode. Most of my analytical work now is done in .py files, broken up into blocks with `#%%`. Real notebooks feel really clunky since adopting the approach.

I wish more data scientists used light percent format notebooks `#%%`. It can be combined now with other powerful tools (linting, formatting and git) that is impossible with the `ipynb` format

I always like this better than true notebooks for a lot of purposes, but it's long overdue that we standardize on a format here. Knitr and RMarkdown never caught on, and Org Mode and VS Code both just do their own thing. It's a shame there isn't something more "portable".

Re: JupyterLab 4.0

#127

Question for the more experienced than me but how does JupyterLab/Notebooks compare with the likes of datasette[0]? [0] https://datasette.io/

Not really the same thing. Notebooks are a tool for interactive programming, maybe even literate programming if you want. They happen to be most commonly used in data science and data analysis work, where interactivity is important.

Re: JupyterLab 4.0

#128
post #44

I keep experimenting with Jupyter in the context of telemetry/fault analysis and then hitting a wall with it where: - I get an analysis that I like, but there isn't a good way to share it with others, so I end up just taking screenshots. - There isn't a good way to take the same analysis and plug new data into it, other than to copy-paste the entire notebook. - The process to "promote" fragments of a notebook into be…

For a while I viewed Jupyter as a toy that is neither here nor there (sitting between the chairs of development and explanation, briefing or visualization and not doing either job great). But about 2 years ago when I changed jobs into a "Jupyter heavy" environment I was forced to learn it and have grown to really like it. I primarily use Jupyter for prototyping: trying ideas, plotting results and sharing notebooks fo…

This seems like a nice approach. Mine is similar. I refactor often, by moving stuff from a lower level of discipline to a higher one:

Enclose scripts in functions within the notebook, which minimizes the clutter of hidden state. I also have a habit of not walking away from a notebook without doing a "restart kernel and run all cells" to make sure the notebook works. I'm not dealing with giant data sets, so this doesn't cost me much.

Frequently used functions go into .py files, using auto-reload to keep things synchronized while I'm working on them.

Mature .py files that I might want to re-use in different projects get turned into pip-installable packages. The notebooks become informal tests of the packages.

I've never used venv, and never encountered dependency version problems. Some of the dependency horror stories may be obsolete due to the maturation of the big packages such as numpy and matplotlib.

Re: JupyterLab 4.0

#129

Is there a similar notebook application like https://livebook.dev/ for Python? I like Jupyter, but after trying out Livebook with Elixir I wish there was something similar in Python. Smart cells and Toggling parts of code on/off is extremely useful features in a Notebook app.

I'm not sure what smart sales are, but the older Jupyter Notebook interface had several optional plug-ins that let you control things like freezing cells from being re-executed, controlling cell execution order, etc.

Re: JupyterLab 4.0

#130
post #70
post #66

Earlier quoted context omitted.

jupytext is great. It even allows you to use only .py files directly as notebooks, but I recommend "pair with ipynb" and version controlling the .py file. The ipynb acts like a cache of the cell outputs between invocations of jupyterlab, which is handy too.

I always wanted a Jupyter like environment, but the one that would natively support and output .py files jupyter notebook as IDE, but with .py files instead of .ipynb

This is exactly what jupytext gives you. The "pairing" is optional (and sometimed confusing). You can just work with .py files as notebooks and never ever see a .ipynb on your disk again.

The notebook .py files are just regular python files with comments that can be edited at hand wih any text editor. Thus you can easily collaborate with your local graybeards that will dislike editing text on their web browsers.

Post reply on HN