跳转到主要内容

Blockly扩展插件,用于JupyterLab。

项目描述

jupyterlab-blockly

Github Actions Status lite-badge Binder

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

内核

卸载

要删除扩展,执行

conda uninstall -c conda-forge jupyterlab-blockly

pip install jupyterlab-blockly

贡献

开发安装

注意:您需要NodeJS来构建扩展包。

jlpm 命令是JupyterLab附带安装的yarn的固定版本。您可以在下面的jlpm处使用yarnnpm

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的符号链接。

打包扩展

RELEASE

项目详情


下载文件

下载您平台上的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

jupyterlab_blockly-0.3.3.tar.gz (4.6 MB 查看散列)

上传时间

构建分布

jupyterlab_blockly-0.3.3-py3-none-any.whl (1.9 MB 查看哈希值)

上传时间 Python 3

支持者