-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JupyterLab 3 support? #34
Comments
@bollwyvl Yeah, I agree, Jupyterlab 3 solves a lot of the deployment issues. And it is definitely top of my list. |
Great, I'll update the above with the punch list (and stop preaching to the choir), and see if there are upstreams I can help on. I don't anticipate 3.1 being a major burden for "pure" widget packages, and the delta between code in 2/3 (unlike the lumino thing, and the icon disaster) is not that big, just the packaging business. |
Pushing to get the CI up and running for pythreejs, which should help review, etc. |
It's a little hard to tell what this repo actually depends on (vs demo stuff) so if you know which extensions are required, please add them, and I'll see what i can do... |
By waiting for 3.1 I just meant to wait until the incompatibilities with Jupyterlab 3 and some other stuff are gone. Just being on the very careful/coward side here. With Jupyterlab 2 I spent days to find the right combination of python module versions and npmjs versions for my two major jupyter based projects.
jupyterlab-cadquery needs what is shown in
The |
Just tested it, |
Yeah, Datawidgets is a dep of jupyter-threejs, and it's how those sweet, sweet binay buffers get to the browser without becoming strings. It's ready to go, and will automagically get pulled in.
yeah, the whole node vs python thing (or really, node at all, for users) was not fun, especially on windows. Hence my interest in getting out of those particular woods, and back to building cool stuff. on the js side, typescript is the best tool in the shed for keeping stuff sane, but that's a whole other ball of fish.
Sure, that's great... the only thing is sometimes extensions that are Three.js was actually one of the motivators in us starting with webpack, as require.js/umd was not up to the task of handling multiple The remaining packaging weirdness, |
The PR this issue is blocked by was closed and replaced with jupyter-widgets/pythreejs#350, which is now merged. I'm not totally clear on if that means this is unblocked or not, but I figured I would mention it while I was looking around to see if there was anything I could help with. I'll try to setup my environment so I can actually help with testing/building/whatever. |
Right: merged, but no release yet. I've been trying to get the CI up and running, as it seems like not having viable logs is hurting progress. |
@bollwyvl @tescalada I have successfully split my code and moved the widget stuff into a separate repository (https://github.com/bernhard-42/jupyter-cadquery-widgets) and deployed While it was still a hassle to migrate from JL 2 to 3 (unravelling my code, and then dealing with the quirks of typescript in a javascript project) the result is amazing. The installation now is a simple
Thanks for your help, really appreciated. |
Very, very awesome. Trying the binder out now!
Once you cut a for-real 2.0.0 release, i'll fire up the conda-forge machinery... let me know if you would like to co-maintain, but the burden is much lower for downstreams with lab3. |
@bollwyvl What do you mean with
I've just just tested it in Chrome and everything works as expected. If it still shows errors for you, maybe you could add a screeenshot? Btw. if you look at I will iron out some rough edges around binder and work on documentation. If done I will release 2.0.0. What do you mean by "conda-forge machinery" - never looked into it ... |
yeah, that's the beauty of Other Peoples' Computers, and passing geometry over the binary pipe 🎉 !
right. for my purposes, if it isn't on conda-forge, i can't use it 😊 . in a local clone of https://github.com/conda-forge/staged-recipes i'd run: cd recipes
grayskull pypi jupyter-cadquery that would generate a more importantly, it will show packages that aren't available yet... so probably cadquery 2.1. you run it once locally, if it works, you push it and make a PR, it builds on lin/osx/win, and somebody reviews it. they either kick it back and we fix it, or they Press The Button, and within the hour (usually) it's up on Then, every time the upstream (you in this case) makes a new If we feel really good about it (e.g. it runs all the tests, with coverage, and a threshold) we can turn on automerge, and it will just happen... but i'm always really scared of that, even though i maintain x00 packages (i try not to look)... including the cadquery. So i probably gotta go check out what needs doing. I'll also take a quick look at your rc tarball and see if it "smells good"... |
Cool, as soon as I have 2.0.0 I'll try the conda-forge steps. Do I need the conda forge steps also for |
Trying to test out the new build, 2.0.0-rc1 is not yet pushed/tagged in dockerhub. |
it would run the thing, and throw up some shouty red text about how the dependency is missing. one can submit multiple recipes in a single feedstock. only do this if it's useful and exciting for you, otherwise i have no problem getting it going! |
@tescalada My upload of the docker image is still running :-( |
The export uses the ipywidgets embedding feature. Not really useful for binder, was more for local documentation of your model. Will remove it from the example and explain in docs, since it seems to be confusing. |
Having a look down the chain... there are layers and layers of build stuff to get cadquery 2.1, so i wouldn't worry too much about it today... |
@tescalada Finally, the docker image is uploaded to docker hub and |
@bollwyvl Currently the installation works like this (which is already a huge improvement) conda create -n cq21-jl3 -c conda-forge -c cadquery python=3.8 cadquery
conda activate cq21-jl3
pip install jupyter-cadquery==2.0.0-rc1
jupyter lab The shortest I could imagine would be (after release of 2.0.0) conda create -n cq21-jl3 -c conda-forge -c cadquery python=3.8 cadquery jupyter-cadquery=2.0.0
conda activate cq21-jl3
jupyter lab More importantly. if CadQuery 2.1 is already installed in an environment, then a simple pip install jupyter-cadquery==2.0.0
jupyter lab does the trick. Nice! This JL 3 stuff is so much simpler already. Awesome job! |
works is good! However: re conda-forge: as long as you have a dependency (as you should) on a (bottom-pinned version) of |
@bollwyvl You were right, the HTML export is broken. What I saw today, I lost two features by migrating to JL3
Now I need to find ways to get both features back - at least the first feature, since it looks like there is a PR in volia zu a lab app as frontend (not sure it would solve my problem) Just some feedback on how easy it is to migrate to JL3 ;-) |
I've been working on trying to pull parts of jupyter-cadquery into a flask app so I can publish my parametric models to a webapp. I just figured out why my html has not been rendering. Not sure if its the same issue causing the html renderer to not work here but it might be. I was seeing the message |
@tescalada Just release 2.0.0. HTML export now works again. Please look into the example |
@bollwyvl Fixed embedding and notebook support and published 2.0.0. |
Binder i used for above: In looking at the binder environment, I see it installs the rc from pip... perhaps making the binder "hot" (e.g. doing the full build), and still tagging the release, would give better results. Let me know if you're interested, happy to PR! |
The threejs stuff is not in the So from the Jupyter UI I think it is a CORS problem to read from unpkg.com |
The link I embedded in the Readme.md contains the release version, because I want to control when a new version is used for binder (e.g. I had earlier two binder links, one to the old version and one to a tested dev version).
I am pretty new to binder and the way I did it was the way it worked for me. So happy to learn from you how to improve it. |
Ah, yes, i see that now, must have clicked off a bad link.
Welp, binder only builds when you ask it to. So keeping the advertised one pointed at a release is great, and should usually stay in cache. My big argument is usually that having the hot one (but you have to think about building the link a little bit) allows PRs to be evaluated interactively. By having semi-loose pins, e.g. Another approach to a "release" binder is to have a branch, e.g. |
I know, it wasn't meant like that ... but just wanted to put your attention to jupyter-widgets/pythreejs#359. pythreejs is really awesome, I just feel it could need some more love :-) |
Yeah, that's a pretty big ship to turn... I don't know the full impacts of
what a large version bump would entail with respect to codegen, etc. but
the mouse stuff sounds very compelling.
A little slammed right now, trying to get some demos out, but there's
always a chance $DAY_JOB might need some new hotness related to geometry
that might get me moving in this space.
Feel free to try out a PR over there and ping me... Use cases talk, but
code walks, and it's much easier to assess big changes in the context of
(broken) CI.
|
Closing for now since Jupyterlab 3 is supported |
Hello, and thanks for this marvelous tool.
I'd very much like to see this up and running in JupyterLab 3... it constitutes something of a hard break, as the primary distribution would be via only
pip install
(though nice devs also continue to publish tonpm
, so that others can extend their stuff). The benefits for users are very significant: no more runtime nodejs, mysterious downloads of 100s of MiB fromnpmjs.org
, a single source of version truth per package, etc. The development workflow is a little weird, more like the nbextension, as it relies ondata_files
to put stuff in a place on disk, but being able to build once on linux, and test built wheels/sdist everywhere else is priceless.Happy to help in any way I can!
Blocked By
The text was updated successfully, but these errors were encountered: