跳转到主要内容

为JupyterLab处理ROS包的服务器扩展

项目描述

jupyter-rospkg

Github Actions Status 为JupyterLab处理ROS包的服务器扩展

此扩展由一个名为 jupyter_rospkg 的Python包组成,用于服务器扩展。

要求

  • JupyterLab >= 3.0

安装

要安装扩展,请执行

pip install jupyter_rospkg

卸载

要删除扩展,请执行

pip uninstall jupyter_rospkg

故障排除

如果不起作用,请检查服务器扩展是否已启用

jupyter server extension list

贡献

开发安装

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

jlpm 命令是JupyterLab安装的yarn的固定版本。您可以使用 yarnnpm 替代以下 jlpm

# Clone the repo to your local environment
# Change directory to the jupyter_rospkg directory
# Install package in development mode
pip install -e .

# Server extension must be manually installed in develop mode
jupyter server extension enable jupyter_rospkg

您可以在不同的终端中同时监视源目录并运行JupyterLab,以监视扩展源的更改并自动重新构建扩展。

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

在运行“watch”命令时,每次保存的更改都将立即在本地构建并可供您正在运行的JupyterLab使用。刷新JupyterLab以在浏览器中加载更改(您可能需要等待几秒钟以重建扩展)。

默认情况下,jlpm build命令为该扩展生成源映射,以便更易于使用浏览器开发者工具进行调试。要同时为JupyterLab核心扩展生成源映射,可以运行以下命令

jupyter lab build --minimize=False

开发卸载

# Server extension must be manually disabled in develop mode
jupyter server extension disable jupyter_rospkg
pip uninstall jupyter_rospkg

在开发模式下,您还需要删除由jupyter labextension develop命令创建的符号链接。要找到其位置,可以运行jupyter labextension list以确定labextensions文件夹的位置。然后您可以在该文件夹中删除名为jupyter-rospkg的符号链接。

测试扩展

服务器测试

此扩展使用Pytest进行Python代码测试。

安装测试依赖项(仅需安装一次)

pip install -e ".[test]"

要执行它们,请运行

pytest -vv -r ap --cov jupyter_rospkg

打包扩展

参见RELEASE

项目详情


下载文件

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

源分发

jupyter_rospkg-0.3.0.tar.gz (8.9 kB 查看哈希值)

上传时间

构建分发

jupyter_rospkg-0.3.0-py3-none-any.whl (8.0 kB 查看哈希值)

上传时间 Python 3

由以下组织支持

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