JupyterLab颜色选择器
项目描述
jupyterlab-color-picker
一个JupyterLab扩展,为Python、Julia、R、CSS、JavaScript和TypeScript添加颜色选择器。
基于 @replit/codemirror-css-color-picker
。
要求
- JupyterLab >= 4.0.0
安装
要安装扩展,执行
pip install jupyterlab-color-picker
卸载
要删除扩展,执行
pip uninstall jupyterlab-color-picker
贡献
开发安装
注意:您需要NodeJS来构建扩展包。
jlpm
命令是JupyterLab的固定版本 yarn,与JupyterLab一起安装。您可以使用 yarn
或 npm
替代下面的 jlpm
。
# Clone the repo to your local environment
# Change directory to the jupyterlab_color_picker directory
# Install package in development mode
pip install -e "."
# 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_color_picker
在开发模式下,您还需要删除由 jupyter labextension develop
命令创建的符号链接。要找到其位置,可以运行 jupyter labextension list
来确定 labextensions
文件夹的位置。然后您可以在该文件夹中删除名为 jupyterlab-color-picker
的符号链接。
测试扩展
前端测试
此扩展使用 Jest 对 JavaScript 代码进行测试。
要执行它们,请执行
jlpm
jlpm test
集成测试
此扩展使用 Playwright 进行集成测试(也称为用户级测试)。更确切地说,JupyterLab 辅助工具 Galata 用于在 JupyterLab 中测试扩展。
更多信息请参考 ui-tests 的 README。
打包扩展
参见 RELEASE
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定要选择哪个,请了解更多关于 安装软件包 的信息。
源代码分发
构建分发
jupyterlab_color_picker-0.1.0.tar.gz 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 1a3db9be4dd7fa52e394d0fee9c4bb952a17daec3c488b46d7d53ae6df4017cc |
|
MD5 | 20f4839dac860f986d3e132e3ffc2234 |
|
BLAKE2b-256 | dadd7900f7a9e7582fd1c1e6cf59bac9ff0055b5e55eb87773853e932d0a6642 |
jupyterlab_color_picker-0.1.0-py3-none-any.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a064ad8fca41b24b8802598eb6a3a0d3dc3191a5db086ed788777b641ac2454e |
|
MD5 | 5c1a2968ad57dd682f8a28270f2d8f69 |
|
BLAKE2b-256 | 0f0a1cb16a3bbb8e3f339787f0b520e1aa928dae6e73bd9ca15987c421ae58be |