JupyterLab WakaTime 扩展。
项目描述
JupyterLab WakaTime
JupyterLab WakaTime 扩展。
需求
- JupyterLab >= 4.0.0
安装
[!警告]
此插件处于早期阶段!
-
执行
pip install jupyterlab_wakatime
-
创建一个
~/.wakatime.cfg
文件,内容如下[settings] api_key = XXXX
将
XXXX
替换为您的实际 API密钥。
卸载
要删除扩展,请执行
pip uninstall jupyterlab_wakatime
故障排除
如果您在JupyterLab服务器机器上安装 wakatime-cli 时遇到问题,请尝试运行
curl -fsSL https://raw.githubusercontent.com/wakatime/vim-wakatime/master/scripts/install_cli.py | python
如果上述命令不起作用,请下载 install_cli.py 并使用Python 3手动运行它。
如果您在 https://wakatime.com/plugins/status 中看不到插件,请启用 debug
设置并检查终端中的JupyterLab日志和 wakatime.log
文件。
如果您看到了前端扩展,但它不起作用,请检查服务器扩展是否已启用
jupyter server extension list
如果服务器扩展已安装并启用,但您没有看到前端扩展,请检查前端扩展是否已安装
jupyter labextension list
贡献
开发安装
注意:构建扩展包需要NodeJS。
jlpm
命令是JupyterLab捆绑的版本yarn,与JupyterLab一起安装。您可以使用下面的yarn
或npm
代替jlpm
。
# Clone the repo to your local environment
# Change directory to the jupyterlab_wakatime directory
# Install package in development mode
pip install -e "."
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Server extension must be manually installed in develop mode
jupyter server extension enable jupyterlab_wakatime
# 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
开发卸载
# Server extension must be manually disabled in develop mode
jupyter server extension disable jupyterlab_wakatime
pip uninstall jupyterlab_wakatime
在开发模式下,您还需要删除由jupyter labextension develop
命令创建的符号链接。要找到其位置,可以运行jupyter labextension list
以确定labextensions
文件夹的位置。然后您可以在该文件夹中删除名为jupyterlab-wakatime
的符号链接。
打包扩展
项目详情
jupyterlab_wakatime-0.2.0.tar.gz的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a2052f6f5bfd4dc6a4c87aea4c04187e91d3bab8e7ca8868177b195713949daf |
|
MD5 | 26401f06b45a6dbd26c67e4b567adfff |
|
BLAKE2b-256 | e3e17c03d690dd9484760b66095c3b6d308b1233b284ea52e89460e9309d0458 |
jupyterlab_wakatime-0.2.0-py3-none-any.whl的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 2546bee0734fd67321896d0d3ce34de84493736fa28822c165139897832bb616 |
|
MD5 | 9f6c5006edd2a8746516819e64bc9fdf |
|
BLAKE2b-256 | 0a0d8e8885b674127202301f4e2a8a87af90d128af8dac7d5ea64e79bdf0104e |