一个用于自动化克隆github仓库的jupyterlite扩展。
项目描述
litegitpuller
这是一个用于自动化克隆 GitHub 仓库的 jupyterlite 扩展。
文档
查看 https://litegitpuller.readthedocs.io/en/latest/index.html
需求
- JupyterLab >= 4.0.0
安装
要安装扩展,请执行
pip install litegitpuller
卸载
要删除扩展,请执行
pip uninstall litegitpuller
贡献
开发安装
注意:您需要 NodeJS 来构建扩展包。
jlpm
命令是 JupyterLab 预装版本的 yarn,它随 JupyterLab 一起安装。您可以使用 yarn
或 npm
替代下面的 jlpm
。
# Clone the repo to your local environment
# Change directory to the litegitpuller 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 litegitpuller
在开发模式下,您还需要删除由 jupyter labextension develop
命令创建的符号链接。要找到其位置,可以运行 jupyter labextension list
以确定 labextensions
文件夹的位置。然后您可以在该文件夹中删除名为 @jupyterlite/litegitpuller
的符号链接。
测试扩展
前端测试
此扩展使用 Jest 对 JavaScript 代码进行测试。
要执行它们,请执行
jlpm
jlpm test
集成测试
此扩展使用 Playwright 进行集成测试(也称为用户级测试)。更准确地说,JupyterLab 辅助程序 Galata 用于在 JupyterLab 中测试扩展。
更多详细信息请参阅 ui-tests 的 README。
打包扩展
查看 RELEASE
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。