执行并渲染笔记本为HTML报告。
项目描述
从Rmarkdown或jupyter笔记本生成可重复的报告
Reportsrender允许从jupyter笔记本和Rmarkdown文件创建可重复、外观一致的HTML报告。它使用papermill和Rmarkdown来执行笔记本,并使用Pandoc将它们转换为HTML。
- 功能:
两个执行引擎:papermill和Rmarkdown。
支持jupytext支持的任何格式。
创建可轻松共享的自包含HTML。
隐藏单元格的输入和/或输出。
参数化报告
有关更多详细信息,请参阅文档!
入门指南
使用Rmarkdown引擎将rmarkdown文档执行为HTML
reportsrender --engine=rmd my_notebook.Rmd report.html
使用papermill执行参数化的jupyter笔记本
reportsrender --engine=papermill jupyter_notebook.ipynb report.html --params="data_file=table.tsv"
命令行使用
reportsrender Execute and render a jupyter/Rmarkdown notebook. The `index` subcommand generates an index html or markdown file that links to html documents. Usage: reportsrender <notebook> <out_file> [--cpus=<cpus>] [--params=<params>] [--engine=<engine>] reportsrender index [--index=<index_file>] [--title=<title>] [--] <html_files>... reportsrender --help Arguments and options: <notebook> Input notebook to be executed. Can be any format supported by jupytext. <out_file> Output HTML file. -h --help Show this screen. --cpus=<cpus> Number of CPUs to use for Numba/Numpy/OpenBLAS/MKL [default: 1] --params=<params> space-separated list of key-value pairs that will be passed to papermill/Rmarkdown. E.g. "input_file=dir/foo.txt output_file=dir2/bar.html" --engine=<engine> Engine to execute the notebook. [default: auto] Arguments and options of the `index` subcommand: <html_files> List of HTML files that will be included in the index. The tool will generate relative links from the index file to these files. --index=<index_file> Path to the index file that will be generated. Will be overwritten if exists. Will auto-detect markdown (.md) and HTML (.html) format based on the extension. [default: index.html] --title=<title> Headline of the index. [default: Index] Possible engines are: auto Use `rmd` engine for `*.Rmd` files, papermill otherwise. rmd Use `rmarkdown` to execute the notebook. Supports R and python (through reticulate) papermill Use `papermill` to execute the notebook. Works for every kernel available in the jupyter installation.
安装
Conda(推荐)
由于reportsrender依赖于R和Python包,我建议您通过conda进行安装。以下命令将在当前conda环境中安装reportsrender及其所有依赖项
conda install -c conda-forge grst::reportsrender
如果您不想使用conda,可以遵循以下方法
手动安装
获取依赖项
Python
对于Rmarkdown渲染引擎(如果您不打算使用Rmarkdown渲染引擎,则无需安装它们)
R和以下包
rmarkdown reticulate
然后,
从pip安装
pip install reportsrender
或
从GitHub安装
pip install flit flit installfrom github:grst/reportsrender
项目详情
下载文件
下载适合您平台的文件。如果您不确定该选择哪个,请了解有关安装包的更多信息。
源代码分发
reportsrender-0.3.2.tar.gz (818.8 kB 查看哈希值)
构建分发
reportsrender-0.3.2-py3-none-any.whl (117.6 kB 查看哈希值)
关闭
reportsrender-0.3.2.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | cb4ab5b7a561805a3a85b6b7d821c68783a1fbdebf9e12b82610b0b8d9beeca6 |
|
MD5 | 400893643d016cc634d345ae362b6091 |
|
BLAKE2b-256 | 01defbb8ef2c07faf38950c790a4811a6f7fec51d6a38a46d3ae84874da5eb6d |
关闭
reportsrender-0.3.2-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 9c6dc2f6a67fb4ea641b5aa3c5c4e8f4d3a7502b12cce392a95a190bd060d7a7 |
|
MD5 | c38d5503ee290db08815cafcb555bd33 |
|
BLAKE2b-256 | 0c0cfe2d7441db31c3ddc44d579c3b9ef139863a80536c51d3f5cecbb09ceba4 |