%global _empty_manifest_terminate_build 0 Name: python-jupyterlab-system-monitor Version: 0.8.0 Release: 1 Summary: JupyterLab extension to display system information License: BSD-3-Clause URL: https://github.com/jtpio/jupyterlab-system-monitor.git Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ad/a9/2bcf4cb78422bbd42db9314bef38f65eeb292b4e54086e96d13db7808476/jupyterlab-system-monitor-0.8.0.tar.gz BuildArch: noarch Requires: python3-jupyterlab Requires: python3-jupyterlab-topbar Requires: python3-jupyter-resource-usage %description # JupyterLab System Monitor ![Github Actions Status](https://github.com/jtpio/jupyterlab-system-monitor/workflows/Build/badge.svg) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jtpio/jupyterlab-system-monitor/stable?urlpath=lab) [![PyPI](https://img.shields.io/pypi/v/jupyterlab-system-monitor.svg)](https://pypi.org/project/jupyterlab-system-monitor) JupyterLab extension to display system information (memory and cpu usage). Provides an alternative frontend for the `jupyter-resource-usage` metrics: [https://github.com/jupyter-server/jupyter-resource-usage](https://github.com/jupyter-server/jupyter-resource-usage) ![screencast](./doc/screencast.gif) This extension was originally developed as part of the [jupyterlab-topbar](https://github.com/jtpio/jupyterlab-topbar) project, and extracted into its own repository later on. ## TODO - Add Network I/O - Expose more settings ## Prerequisites - JupyterLab 1.0+ - Node.js ## Installation This extension requires the `jupyter-resource-usage` package and the `jupyterlab-topbar-extension` extension for JupyterLab. **Note: This extension is not compatible with `nbresuse==0.3.4`**. Starting from JupyterLab 3.0, extensions can be distributed as a Python package. Installation instructions will differ depending on your version of JupyterLab: ### JupyterLab 3.x ```bash pip install jupyterlab-system-monitor ``` ### JupyterLab 2.x ```bash pip install nbresuse jupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor ``` `nbresuse` can also be installed with `conda`: ```bash conda install -c conda-forge nbresuse ``` Note: Node.js is required to install JupyterLab extensions. It can be installed with `conda`: ```bash conda install -c conda-forge nodejs ``` ## Configuration ### Graphic Display You can set the memory and cpu limits (but not enforce it) to display the indicator in the top bar. For more info, check the [memory limit](https://github.com/jupyter-server/jupyter-resource-usage#memory-limit) in the [nbresuse](https://github.com/jupyter-server/jupyter-resource-usage) repository. Edit `~/.jupyter/jupyter_notebook_config.py` (note: see [here](https://jupyter-notebook.readthedocs.io/en/stable/config.html#config-file-and-command-line-options) if you do not have a config file: ```python c = get_config() # memory c.NotebookApp.ResourceUseDisplay.mem_limit = *1024*1024*1024 # cpu c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True c.NotebookApp.ResourceUseDisplay.cpu_limit = ``` For example: ```python c.NotebookApp.ResourceUseDisplay.mem_limit = 4294967296 c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True c.NotebookApp.ResourceUseDisplay.cpu_limit = 2 ``` Or use the command line option: ```bash # POSIX shell jupyter lab --NotebookApp.ResourceUseDisplay.mem_limit=$(( size_in_GB *1024*1024*1024)) \ --NotebookApp.ResourceUseDisplay.track_cpu_percent=True \ --NotebookApp.ResourceUseDisplay.cpu_limit=$(( number_of_cpus )) ``` ### Advanced Settings You can change the label and refresh rate in JupyterLab's advanced settings editor: ![jupyterlab_setting](./doc/setting.png) ## Troubleshooting If you are experiencing issues with the memory and cpu indicators not being displayed, make sure to check the [nbresuse changelog](https://github.com/jupyter-server/jupyter-resource-usage/blob/master/CHANGELOG.md) for any breaking changes from major releases. ## Development ```bash # create a new conda environment conda create -n jupyterlab-system-monitor -c conda-forge jupyterlab nodejs nbresuse conda activate jupyterlab-system-monitor # Install dependencies jlpm # Install the package in development mode pip install -e . # Link your development version of the extension with JupyterLab jlpm run develop # Rebuild extension TypeScript source after making changes jlpm run build ``` ### Uninstall ```bash pip uninstall jupyterlab-system-monitor ``` %package -n python3-jupyterlab-system-monitor Summary: JupyterLab extension to display system information Provides: python-jupyterlab-system-monitor BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-jupyterlab-system-monitor # JupyterLab System Monitor ![Github Actions Status](https://github.com/jtpio/jupyterlab-system-monitor/workflows/Build/badge.svg) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jtpio/jupyterlab-system-monitor/stable?urlpath=lab) [![PyPI](https://img.shields.io/pypi/v/jupyterlab-system-monitor.svg)](https://pypi.org/project/jupyterlab-system-monitor) JupyterLab extension to display system information (memory and cpu usage). Provides an alternative frontend for the `jupyter-resource-usage` metrics: [https://github.com/jupyter-server/jupyter-resource-usage](https://github.com/jupyter-server/jupyter-resource-usage) ![screencast](./doc/screencast.gif) This extension was originally developed as part of the [jupyterlab-topbar](https://github.com/jtpio/jupyterlab-topbar) project, and extracted into its own repository later on. ## TODO - Add Network I/O - Expose more settings ## Prerequisites - JupyterLab 1.0+ - Node.js ## Installation This extension requires the `jupyter-resource-usage` package and the `jupyterlab-topbar-extension` extension for JupyterLab. **Note: This extension is not compatible with `nbresuse==0.3.4`**. Starting from JupyterLab 3.0, extensions can be distributed as a Python package. Installation instructions will differ depending on your version of JupyterLab: ### JupyterLab 3.x ```bash pip install jupyterlab-system-monitor ``` ### JupyterLab 2.x ```bash pip install nbresuse jupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor ``` `nbresuse` can also be installed with `conda`: ```bash conda install -c conda-forge nbresuse ``` Note: Node.js is required to install JupyterLab extensions. It can be installed with `conda`: ```bash conda install -c conda-forge nodejs ``` ## Configuration ### Graphic Display You can set the memory and cpu limits (but not enforce it) to display the indicator in the top bar. For more info, check the [memory limit](https://github.com/jupyter-server/jupyter-resource-usage#memory-limit) in the [nbresuse](https://github.com/jupyter-server/jupyter-resource-usage) repository. Edit `~/.jupyter/jupyter_notebook_config.py` (note: see [here](https://jupyter-notebook.readthedocs.io/en/stable/config.html#config-file-and-command-line-options) if you do not have a config file: ```python c = get_config() # memory c.NotebookApp.ResourceUseDisplay.mem_limit = *1024*1024*1024 # cpu c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True c.NotebookApp.ResourceUseDisplay.cpu_limit = ``` For example: ```python c.NotebookApp.ResourceUseDisplay.mem_limit = 4294967296 c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True c.NotebookApp.ResourceUseDisplay.cpu_limit = 2 ``` Or use the command line option: ```bash # POSIX shell jupyter lab --NotebookApp.ResourceUseDisplay.mem_limit=$(( size_in_GB *1024*1024*1024)) \ --NotebookApp.ResourceUseDisplay.track_cpu_percent=True \ --NotebookApp.ResourceUseDisplay.cpu_limit=$(( number_of_cpus )) ``` ### Advanced Settings You can change the label and refresh rate in JupyterLab's advanced settings editor: ![jupyterlab_setting](./doc/setting.png) ## Troubleshooting If you are experiencing issues with the memory and cpu indicators not being displayed, make sure to check the [nbresuse changelog](https://github.com/jupyter-server/jupyter-resource-usage/blob/master/CHANGELOG.md) for any breaking changes from major releases. ## Development ```bash # create a new conda environment conda create -n jupyterlab-system-monitor -c conda-forge jupyterlab nodejs nbresuse conda activate jupyterlab-system-monitor # Install dependencies jlpm # Install the package in development mode pip install -e . # Link your development version of the extension with JupyterLab jlpm run develop # Rebuild extension TypeScript source after making changes jlpm run build ``` ### Uninstall ```bash pip uninstall jupyterlab-system-monitor ``` %package help Summary: Development documents and examples for jupyterlab-system-monitor Provides: python3-jupyterlab-system-monitor-doc %description help # JupyterLab System Monitor ![Github Actions Status](https://github.com/jtpio/jupyterlab-system-monitor/workflows/Build/badge.svg) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jtpio/jupyterlab-system-monitor/stable?urlpath=lab) [![PyPI](https://img.shields.io/pypi/v/jupyterlab-system-monitor.svg)](https://pypi.org/project/jupyterlab-system-monitor) JupyterLab extension to display system information (memory and cpu usage). Provides an alternative frontend for the `jupyter-resource-usage` metrics: [https://github.com/jupyter-server/jupyter-resource-usage](https://github.com/jupyter-server/jupyter-resource-usage) ![screencast](./doc/screencast.gif) This extension was originally developed as part of the [jupyterlab-topbar](https://github.com/jtpio/jupyterlab-topbar) project, and extracted into its own repository later on. ## TODO - Add Network I/O - Expose more settings ## Prerequisites - JupyterLab 1.0+ - Node.js ## Installation This extension requires the `jupyter-resource-usage` package and the `jupyterlab-topbar-extension` extension for JupyterLab. **Note: This extension is not compatible with `nbresuse==0.3.4`**. Starting from JupyterLab 3.0, extensions can be distributed as a Python package. Installation instructions will differ depending on your version of JupyterLab: ### JupyterLab 3.x ```bash pip install jupyterlab-system-monitor ``` ### JupyterLab 2.x ```bash pip install nbresuse jupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor ``` `nbresuse` can also be installed with `conda`: ```bash conda install -c conda-forge nbresuse ``` Note: Node.js is required to install JupyterLab extensions. It can be installed with `conda`: ```bash conda install -c conda-forge nodejs ``` ## Configuration ### Graphic Display You can set the memory and cpu limits (but not enforce it) to display the indicator in the top bar. For more info, check the [memory limit](https://github.com/jupyter-server/jupyter-resource-usage#memory-limit) in the [nbresuse](https://github.com/jupyter-server/jupyter-resource-usage) repository. Edit `~/.jupyter/jupyter_notebook_config.py` (note: see [here](https://jupyter-notebook.readthedocs.io/en/stable/config.html#config-file-and-command-line-options) if you do not have a config file: ```python c = get_config() # memory c.NotebookApp.ResourceUseDisplay.mem_limit = *1024*1024*1024 # cpu c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True c.NotebookApp.ResourceUseDisplay.cpu_limit = ``` For example: ```python c.NotebookApp.ResourceUseDisplay.mem_limit = 4294967296 c.NotebookApp.ResourceUseDisplay.track_cpu_percent = True c.NotebookApp.ResourceUseDisplay.cpu_limit = 2 ``` Or use the command line option: ```bash # POSIX shell jupyter lab --NotebookApp.ResourceUseDisplay.mem_limit=$(( size_in_GB *1024*1024*1024)) \ --NotebookApp.ResourceUseDisplay.track_cpu_percent=True \ --NotebookApp.ResourceUseDisplay.cpu_limit=$(( number_of_cpus )) ``` ### Advanced Settings You can change the label and refresh rate in JupyterLab's advanced settings editor: ![jupyterlab_setting](./doc/setting.png) ## Troubleshooting If you are experiencing issues with the memory and cpu indicators not being displayed, make sure to check the [nbresuse changelog](https://github.com/jupyter-server/jupyter-resource-usage/blob/master/CHANGELOG.md) for any breaking changes from major releases. ## Development ```bash # create a new conda environment conda create -n jupyterlab-system-monitor -c conda-forge jupyterlab nodejs nbresuse conda activate jupyterlab-system-monitor # Install dependencies jlpm # Install the package in development mode pip install -e . # Link your development version of the extension with JupyterLab jlpm run develop # Rebuild extension TypeScript source after making changes jlpm run build ``` ### Uninstall ```bash pip uninstall jupyterlab-system-monitor ``` %prep %autosetup -n jupyterlab-system-monitor-0.8.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-jupyterlab-system-monitor -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 0.8.0-1 - Package Spec generated