Skip to content

feat: jupyter lab 3.0 federated bundle support #342

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

Closed
wants to merge 6 commits into from

Conversation

maartenbreddels
Copy link
Member

pip install, and it works 🎉

@maartenbreddels
Copy link
Member Author

Uses bqplot/bqplot#1222 as a template

@@ -19,7 +19,7 @@ module.exports = {
console.error(err);
reject(err);
},
'jupyter-threejs'
'jupyter-threejs-chunk'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is surprising to me. Why do you need -chunk?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the chunk name was not allowed to be the same name as package/module/forgotwhatitwasname, as long as it was not jupyter-threejs it was fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can confirm, have encountered this elsewhere

@agoose77
Copy link
Contributor

agoose77 commented Jan 9, 2021

Is this nearly ready to go? Is there anything else that I can help with? I made a small PR on this branch to use jupyter-packaging: https://github.com/maartenbreddels/pythreejs/pull/1/files

"clean": "rimraf dist && rimraf ../pythreejs/static && rimraf lab-dist && node ./scripts/clean-generated-files.js",
"prepack": "npm run build:bundles-prod",
"prepare": "npm run autogen",
"update:deps": "update-dependency --minimal --regex \"^(?!@jupyter-widgets|three)\"",
"watch": "webpack -d -w"
},
"dependencies": {
"@jupyter-widgets/base": "^1.2.5 || ^2.0.0 || ^3.0.0",
"@jupyter-widgets/base": "^1.2.5 || ^2.0.0 || ^3.0.0 || ^4.0.0-alpha.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"@jupyter-widgets/base": "^1.2.5 || ^2.0.0 || ^3.0.0 || ^4.0.0-alpha.2",
"@jupyter-widgets/base": "^1.2.5 || ^2.0.0 || ^3.0.0 || ^4",

"bluebird": "^3.5.5",
"jupyter-dataserializers": "^2.2.0",
"three": "^0.97.0",
"underscore": "^1.8.3"
},
"devDependencies": {
"@jupyterlab/builder": "^3.0.0-rc.13",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"@jupyterlab/builder": "^3.0.0-rc.13",
"@jupyterlab/builder": "^3.0.0",

@@ -39,6 +41,12 @@
('share/jupyter/lab/extensions',
'js/lab-dist',
'jupyter-threejs-*.tgz'),
('share/jupyter/labextensions/jupyter-threejs/',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agoose77
Copy link
Contributor

@maartenbreddels Are you happy with these changes to your PR? maartenbreddels#2

@bollwyvl
Copy link
Contributor

bollwyvl commented Feb 9, 2021

Can confirm, this PR looks good to go (works locally). I'd wager bumping the nodejs to something not EOL (or about to be) would clean up the CI fail... or just chuck it and head to github actions (which I'd be happy to PR).

@maartenbreddels
Copy link
Member Author

Thanks, I think we only need to agree on maartenbreddels#2

@@ -1,735 +0,0 @@
#!/usr/bin/env python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

"bundled": false,
"singleton": true
}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to hoist threejs as a shared package (non-singleton, ha!)

Comment on lines -729 to -735
# pythreejs specific functions to handle autogen:

# Call this after running wrapper command, but before running wrapped command:

def update_packages(command):
"""update build_py options to get packages changes"""
command.distribution.packages = find_packages()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bit is critical!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one I actually missed, thanks for the catch. Will fix

@agoose77
Copy link
Contributor

agoose77 commented Feb 12, 2021

Just a note: this is probably waiting on maartenbreddels#2

Apologies for some of the commit noise.

Edit: I've created #350 to replace this PR and my PR that's partially merged in here. Hopefully that should clean things up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants