跳转到主要内容

自定义Jupyter Widget库

项目描述

jupyter-widget-echo-testing

Build Status codecov

自定义Jupyter Widget库

安装

您可以使用pip进行安装

pip install jupyter_widget_echo_testing

如果您使用的是Jupyter Notebook 5.2或更早版本,您可能还需要启用nbextension

jupyter nbextension enable --py [--sys-prefix|--user|--system] jupyter_widget_echo_testing

开发安装

创建开发环境

conda create -n jupyter_widget_echo_testing-dev -c conda-forge nodejs yarn python jupyterlab
conda activate jupyter_widget_echo_testing-dev

安装Python。这将也会构建TS包。

pip install -e ".[test, examples]"

在开发您的扩展时,您需要手动使用笔记本/实验室前端启用您的扩展。对于实验室,这是通过以下命令完成的

jupyter labextension develop --overwrite .
yarn run build

对于经典笔记本,您需要运行

jupyter nbextension install --sys-prefix --symlink --overwrite --py jupyter_widget_echo_testing
jupyter nbextension enable --sys-prefix --py jupyter_widget_echo_testing

请注意,--symlink标志在Windows上不起作用,因此您在这里必须每次重新构建您的扩展时都运行install命令。对于某些安装,您可能还需要使用除--sys-prefix之外的另一个标志,但这里不会介绍这些标志的含义。

如何查看您的更改

Typescript

如果您使用JupyterLab进行开发,则可以监视源目录,并在不同的终端中同时运行JupyterLab以监视扩展源中的更改并自动重建小部件。

# Watch the source directory in one terminal, automatically rebuilding when needed
yarn run watch
# Run JupyterLab in another terminal
jupyter lab

更改后,等待构建完成,然后刷新浏览器,更改应生效。

Python

如果您更改了Python代码,则需要重新启动笔记本内核才能使其生效。

项目详情


下载文件

下载适合您平台的应用程序文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

jupyter_widget_echo_testing-0.1.2.tar.gz (61.2 kB 查看哈希值)

上传时间

构建分布

jupyter_widget_echo_testing-0.1.2-py2.py3-none-any.whl (122.7 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面