%global _empty_manifest_terminate_build 0 Name: python-nbclick Version: 0.4.1 Release: 1 Summary: Modify and run Jupyter notebooks from the command line License: MIT URL: https://pypi.org/project/nbclick/ Source0: https://mirrors.aliyun.com/pypi/web/packages/bf/d3/2c88fc6ebc4bd4b6c99be845beb279a9ca94b918a23caf541758053c1441/nbclick-0.4.1.tar.gz BuildArch: noarch %description # nbclick - Turn Jupyter notebooks into command line applications [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![PyPI version](https://badge.fury.io/py/nbclick.svg)](https://badge.fury.io/py/nbclick) `nbclick` allows you to modify and run Jupyter notebooks from the commandline. It builds on top of [nbparameterise](https://github.com/takluyver/nbparameterise) which allows programmatic extraction and modification of parameters of Jupyter notebooks. ## Installation `nbclick` can be installed using `pip`: ``` python -m pip install nbclick ``` It is also possible to run `nbclick` without prior installation using `pipx`: ``` pipx run --system-site-packages nbclick ``` Note that the `--system-site-packages` flag is absolutely necessary if your notebook depends on any non-standard library Python package. ## Running nbclick After installation, you can run `nbclick` using the commandline: ``` nbclick ``` The most important argument is the `NOTEBOOK` parameter. For a given notebook, you can again use `--help` to display the configuration options: ``` nbclick mynotebook.ipynb --help ``` ## Preparing a notebook for execution with nbclick `nbclick` relies on `nbparameterise` to extract command line options from your Jupyter notebook. The best way to specify customizable parameters is to place them into the first code cell of the notebook as simple assignments: ```python num_samples = 1000 # The number of samples to draw outfile = "output.csv" # The filename to store the results ``` For above case, the output of `nbclick notebook.ipynb --help` will be: ``` Usage: nbclick notebook.ipynb [OPTIONS] Options: --num_samples INTEGER The number of samples to draw [default: 1000] --outfile TEXT The filename to store the results [default: output.csv] --help Show this message and exit. ``` ## Limitations There are a few known limitations that result from upstream projects that I currently do not plan to fix for `nbclick`: * The number of parameter types recognized is quite small. `nbclick` is known to work with `int`, `float`, `bool`, `str`, `list` (of both homogeneous and heterogeneous type). Most notably, `nbparameterise` does not support `tuple`s. * List parameters are restricted to fixed length (defined by their default). This results from `click` voluntarily chosing not to provide variable length list parameters, as it introduces ambiguity of the parser. %package -n python3-nbclick Summary: Modify and run Jupyter notebooks from the command line Provides: python-nbclick BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-nbclick # nbclick - Turn Jupyter notebooks into command line applications [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![PyPI version](https://badge.fury.io/py/nbclick.svg)](https://badge.fury.io/py/nbclick) `nbclick` allows you to modify and run Jupyter notebooks from the commandline. It builds on top of [nbparameterise](https://github.com/takluyver/nbparameterise) which allows programmatic extraction and modification of parameters of Jupyter notebooks. ## Installation `nbclick` can be installed using `pip`: ``` python -m pip install nbclick ``` It is also possible to run `nbclick` without prior installation using `pipx`: ``` pipx run --system-site-packages nbclick ``` Note that the `--system-site-packages` flag is absolutely necessary if your notebook depends on any non-standard library Python package. ## Running nbclick After installation, you can run `nbclick` using the commandline: ``` nbclick ``` The most important argument is the `NOTEBOOK` parameter. For a given notebook, you can again use `--help` to display the configuration options: ``` nbclick mynotebook.ipynb --help ``` ## Preparing a notebook for execution with nbclick `nbclick` relies on `nbparameterise` to extract command line options from your Jupyter notebook. The best way to specify customizable parameters is to place them into the first code cell of the notebook as simple assignments: ```python num_samples = 1000 # The number of samples to draw outfile = "output.csv" # The filename to store the results ``` For above case, the output of `nbclick notebook.ipynb --help` will be: ``` Usage: nbclick notebook.ipynb [OPTIONS] Options: --num_samples INTEGER The number of samples to draw [default: 1000] --outfile TEXT The filename to store the results [default: output.csv] --help Show this message and exit. ``` ## Limitations There are a few known limitations that result from upstream projects that I currently do not plan to fix for `nbclick`: * The number of parameter types recognized is quite small. `nbclick` is known to work with `int`, `float`, `bool`, `str`, `list` (of both homogeneous and heterogeneous type). Most notably, `nbparameterise` does not support `tuple`s. * List parameters are restricted to fixed length (defined by their default). This results from `click` voluntarily chosing not to provide variable length list parameters, as it introduces ambiguity of the parser. %package help Summary: Development documents and examples for nbclick Provides: python3-nbclick-doc %description help # nbclick - Turn Jupyter notebooks into command line applications [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![PyPI version](https://badge.fury.io/py/nbclick.svg)](https://badge.fury.io/py/nbclick) `nbclick` allows you to modify and run Jupyter notebooks from the commandline. It builds on top of [nbparameterise](https://github.com/takluyver/nbparameterise) which allows programmatic extraction and modification of parameters of Jupyter notebooks. ## Installation `nbclick` can be installed using `pip`: ``` python -m pip install nbclick ``` It is also possible to run `nbclick` without prior installation using `pipx`: ``` pipx run --system-site-packages nbclick ``` Note that the `--system-site-packages` flag is absolutely necessary if your notebook depends on any non-standard library Python package. ## Running nbclick After installation, you can run `nbclick` using the commandline: ``` nbclick ``` The most important argument is the `NOTEBOOK` parameter. For a given notebook, you can again use `--help` to display the configuration options: ``` nbclick mynotebook.ipynb --help ``` ## Preparing a notebook for execution with nbclick `nbclick` relies on `nbparameterise` to extract command line options from your Jupyter notebook. The best way to specify customizable parameters is to place them into the first code cell of the notebook as simple assignments: ```python num_samples = 1000 # The number of samples to draw outfile = "output.csv" # The filename to store the results ``` For above case, the output of `nbclick notebook.ipynb --help` will be: ``` Usage: nbclick notebook.ipynb [OPTIONS] Options: --num_samples INTEGER The number of samples to draw [default: 1000] --outfile TEXT The filename to store the results [default: output.csv] --help Show this message and exit. ``` ## Limitations There are a few known limitations that result from upstream projects that I currently do not plan to fix for `nbclick`: * The number of parameter types recognized is quite small. `nbclick` is known to work with `int`, `float`, `bool`, `str`, `list` (of both homogeneous and heterogeneous type). Most notably, `nbparameterise` does not support `tuple`s. * List parameters are restricted to fixed length (defined by their default). This results from `click` voluntarily chosing not to provide variable length list parameters, as it introduces ambiguity of the parser. %prep %autosetup -n nbclick-0.4.1 %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-nbclick -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Jun 20 2023 Python_Bot - 0.4.1-1 - Package Spec generated