Blockly扩展插件,用于JupyterLab。
项目描述
jupyterlab-blockly
Blockly扩展插件,用于JupyterLab。
Blockly
Blockly是谷歌为构建初学者友好的基于块的编程语言而创建的库。
文档: https://developers.google.com/blockly/guides/overview 仓库: https://github.com/google/blockly
需求
- JupyterLab >= 4.0.0
安装
要安装扩展,执行
conda install -c conda-forge jupyterlab-blockly
或
pip install jupyterlab-blockly
内核
- ipykernel
- xeus-python
- xeus-lua
- JavaScript
- JavaScript
卸载
要删除扩展,执行
conda uninstall -c conda-forge jupyterlab-blockly
或
pip install jupyterlab-blockly
贡献
开发安装
注意:您需要NodeJS来构建扩展包。
jlpm
命令是JupyterLab附带安装的yarn的固定版本。您可以在下面的jlpm
处使用yarn
或npm
。
micromamba create -n blockly -c conda-forge python nodejs=18 pre-commit jupyterlab jupyter-packaging jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua
micromamba activate blockly
# Clone the repo to your local environment
# Change directory to the jupyterlab_blockly directory
# Installing pre-commit to run command when adding commits
pre-commit install
# Install package in development mode
pip install -e ".[dev]"
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm build
您可以在不同的终端同时监视源目录并运行JupyterLab,以监视扩展源代码的变化并自动重新构建扩展。
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab
当监视命令运行时,每次保存的更改都将立即本地构建并可供您的运行中的JupyterLab使用。刷新JupyterLab以在浏览器中加载更改(您可能需要等待几秒钟,直到扩展被重新构建)。
默认情况下,jlpm build
命令为此扩展生成源映射,使其更容易使用浏览器开发者工具进行调试。要为JupyterLab核心扩展也生成源映射,可以运行以下命令
jupyter lab build --minimize=False
开发卸载
pip uninstall jupyterlab_blockly
在开发模式下,您还需要删除由jupyter labextension develop
命令创建的符号链接。要找到其位置,您可以运行jupyter labextension list
以确定labextensions
文件夹的位置。然后您可以在该文件夹中删除名为jupyterlab-blockly
的符号链接。
打包扩展
项目详情
关闭
jupyterlab_blockly-0.3.3.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 0737bfbba9f2c7dbde28475e9d269419254a49974873d0de2fdc94134c69f7f2 |
|
MD5 | 25856447d7b9b7b4011054d9105250e7 |
|
BLAKE2b-256 | fe3dd1ff6b4362636c59508c460ccfee8393be49323e7a549216120fa297ab89 |
关闭
jupyterlab_blockly-0.3.3-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 91cdeb77949ba4694d92c5b28ec2b62ecb3852983f62e7a1833bb1a204eff4b3 |
|
MD5 | 239130498958267112ce22ea96245953 |
|
BLAKE2b-256 | 9bb560a8bc224d3184da954a693625fcd0d44cdb82fb4b306337f6f65353b8a3 |