Skip to main content

A JupyterLab extension, public by PiLab.

Project description

pi_service


调试

调试安装
# Clone the repo to your local environment
# Change directory to the pi_lab_jupyter_extension 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 run build

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch

# Run JupyterLab in another terminal
jupyter lab --ip 0.0.0.0 --port 8888 --watch

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

By default, the jlpm run build command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:

jupyter lab build --minimize=False
卸载
# 卸载对应的python包
pip uninstall pi-lab-jupyter-extension

# 删除 通过`jupyter labextension develop .` 命令创建的软连接, 可以通过 `jupyter labextension list` 命令查看
jupyter labextension list
rm <labextension path>

发布 Pypi 包

This extension can be distributed as Python packages. All of the Python packaging instructions in the pyproject.toml file to wrap your extension in a Python package. Before generating a package, we first need to install build.

# 安装 编译`build`工具, pypi上传工具`twine`
python3 -m pip install build twine

# 编译
# To create a Python source package (`.tar.gz`) and the binary package (`.whl`) in the `dist/` directory, do:
python -m build --wheel

# 上传到 pypi
twine check dist/*

安装

pip install pi-lab-jupyter-extension

# 指定特定版本
pip install pi-lab-jupyter-extension==0.0.1

使用

import pi_lab_jupyter_pi_service
pi_lab_jupyter_pi_service.auth

卸载

pip uninstall pi-lab-jupyter-extension

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pi_lab_jupyter_extension-0.0.1-py3-none-any.whl (3.4 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page