Skip to main content

Generate reproducible reports from Rmarkdown or jupyter notebooks

Build Status Documentation Status The uncompromising python formatter

Reportsrender allows to create reproducible, consistently looking HTML reports from both jupyter notebooks and Rmarkdown files. It makes use of papermill and Rmarkdown to execute notebooks and uses Pandoc to convert them to HTML.

Features:
  • two execution engines: papermill and Rmarkdown.

  • support any format supported by jupytext.

  • create self-contained HTML that can be shared easily.

  • hide inputs and/or outputs of cells.

  • parametrized reports

See the documentation for more details!

Getting started

  • Execute an rmarkdown document to HTML using the Rmarkdown engine

reportsrender --engine=rmd my_notebook.Rmd report.html
  • Execute a parametrized jupyter notebook with papermill

reportsrender --engine=papermill jupyter_notebook.ipynb report.html --params="data_file=table.tsv"

Usage from command line

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.

Installation

Manual installation:

Get dependencies:

For the Rmarkdown render engine additionally (there is no need to install them if you are not going to use the Rmarkdown rendeirng engine):

  • R and the following packages:

rmarkdown
reticulate

then,

Install from pip:

pip install reportsrender

or,

Install from github:

pip install flit
flit installfrom github:grst/reportsrender

Metadata

Release files for reportsrender 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reportsrender 0.3.2
File Size Uploaded
reportsrender-0.3.2.tar.gz 818.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reportsrender 0.3.2
File Interpreter ABI Platform
reportsrender-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 936.5 kB

Release files / reportsrender-0.3.2.tar.gz

Download URL reportsrender-0.3.2.tar.gz
Size 818.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cb4ab5b7a561805a3a85b6b7d821c68783a1fbdebf9e12b82610b0b8d9beeca6
BLAKE2b-256 checksum
How to use checksums
01defbb8ef2c07faf38950c790a4811a6f7fec51d6a38a46d3ae84874da5eb6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.22.0

Release files / reportsrender-0.3.2-py3-none-any.whl

Download URL reportsrender-0.3.2-py3-none-any.whl
Size 117.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c6dc2f6a67fb4ea641b5aa3c5c4e8f4d3a7502b12cce392a95a190bd060d7a7
BLAKE2b-256 checksum
How to use checksums
0c0cfe2d7441db31c3ddc44d579c3b9ef139863a80536c51d3f5cecbb09ceba4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.22.0

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page