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

JupyterLab+Colab extension #109

Merged
merged 50 commits into from
Jan 16, 2024

Conversation

DanielSchiavini
Copy link
Collaborator

@DanielSchiavini DanielSchiavini commented Dec 14, 2023

Fixes #83

  • Fix pre-commit checks
  • Create a jupyter server extension
  • Inject ethers and boa code via Python Javascript
  • Implement front-end callbacks via JS file
  • Simplify the browser signer
  • Usage example available in Launch beta.vyperlang.org try.vyperlang.org#1
  • Add support for Google Colab
  • Figure out how to implement tests with jupyter dependencies

Usage

import boa
from boa.integrations.jupyter import BrowserSigner
from boa.network import NetworkEnv

boa.set_env(NetworkEnv(...))
boa.env.add_account(BrowserSigner())

Cute animal in Jupiter

image
source

@DanielSchiavini DanielSchiavini marked this pull request as ready for review December 15, 2023 10:01
@DanielSchiavini DanielSchiavini changed the title WIP: JupyterLab extension JupyterLab extension Dec 15, 2023
@DanielSchiavini DanielSchiavini marked this pull request as draft December 16, 2023 16:15
@DanielSchiavini
Copy link
Collaborator Author

DanielSchiavini commented Jan 10, 2024

This PR was drafted because we wanted to investigate support for notebook v6.

Since v6 is deprecated and works quite differently, I discussed with @charles-cooper that it was best to support JupyterLab and Google Colab only.

@DanielSchiavini DanielSchiavini marked this pull request as ready for review January 10, 2024 15:52
@DanielSchiavini DanielSchiavini changed the title JupyterLab extension JupyterLab+Colab extension Jan 15, 2024
token = _generate_token()
javascript = snippet(token, **kwargs)

if importlib.util.find_spec("google.colab"):
Copy link
Member

Choose a reason for hiding this comment

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

dark magic :)

Copy link
Member

@charles-cooper charles-cooper left a comment

Choose a reason for hiding this comment

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

incredible work. thank you!!!

@charles-cooper charles-cooper merged commit e7115a6 into vyperlang:master Jan 16, 2024
5 of 7 checks passed
@DanielSchiavini DanielSchiavini deleted the 83/jupyter-extension branch January 16, 2024 15:18
@charles-cooper
Copy link
Member

it would be cool to get the RPC url from the browser signer (h/t @bout3fiddy for the idea), but out of scope here. will open a new issue for it

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.

feature: jupyterlab extension
2 participants