Skip to content
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

Add jlab_link script to link local changes into development Jupyterlab #1309

Merged
merged 2 commits into from
Jan 28, 2021

Conversation

sc1f
Copy link
Contributor

@sc1f sc1f commented Jan 22, 2021

This PR fixes #1299 by adding yarn jlab_link, which uses yarn link to force Jupyterlab to pull @finos-perspective* packages from a local development directory instead of from NPM. As of v0.6.0, developers are no longer able to see their local directory changes to packages other than @perspective-jupyterlab in Jupyterlab, as Jupyterlab is pulling these packages from NPM during jupyter lab build. We used to inline the entirety of Perspective into the Jupyterlab plugin, but this is inefficient for dists and not a great development practice.

Using yarn jlab_link, developers are now able to see their local changes inside the Jupyterlab plugin, and the dist has not been changed to inline Perspective. Instead, developers should yarn link all Perspective packages inside the packages folder, and then run yarn jlab_link, which will find the Jupyterlab path, add the linked packages to Jupyterlab, and trigger a build which will incorporate the sym-linked Perspective packages instead of attempting to find them from NPM:

Screen Shot 2021-01-22 at 2 06 23 PM

We can see that local changes (the console.log statements) are showing up as part of the Jupyterlab plugin.

@sc1f sc1f added internal Internal refactoring and code quality improvement Jupyter Python development labels Jan 22, 2021
Copy link
Member

@timkpaine timkpaine left a comment

Choose a reason for hiding this comment

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

needs updates to developer docs :-)

@sc1f
Copy link
Contributor Author

sc1f commented Jan 23, 2021

needs updates to developer docs :-)

Good catch - added! @texodus I also noticed the animation script for the main site was broken, and fixed it as well as part of this patch.

@texodus texodus removed the internal Internal refactoring and code quality improvement label Jan 23, 2021
Copy link
Member

@texodus texodus left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Looks good!

@texodus texodus merged commit afd360e into master Jan 28, 2021
@texodus texodus deleted the fix-jlab-local branch January 28, 2021 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building Jupyterlab plugin from source does not pull working directory changes
3 participants