trepr.report module¶
General facilities to generate a report.
To do scientific research in terms of reproducibility and traceability it’s highly necessary to report all the steps done on a given dataset and never separate the dataset from its metadata.
This module provides functionality to create a report containing a 1D and 2D plot of the dataset, its metadata and all processing steps including parameters.
“Batteries included”: Templates contained in the package¶
The “batteries included” approach of Python itself is probably responsible to a great deal for the success of Python as a language. Similarly, the trepr package tries to provide you with a sensible set of tools you need for your routine data analysis. Reports are no exception to that rule.
Thanks to being based on the ASpecD framework, the trepr package comes bundled with a (growing) series of templates allowing you to create reports of datasets and alike. Thus, getting access to all information stored in a single dataset is as simple as calling a single reporter, and in context of recipe-driven data analysis, it is even simpler:
- kind: report
type: LaTeXReporter
properties:
template: dataset.tex
filename: report.tex
compile: true
This would create a report of a dataset that is then stored in the file
report.tex
, using the template dataset.tex
bundled with the trepr
(and ASpecD) package. As you even set compile
to true, it would even
compile the LaTeX report, including all figures generated during cooking the
recipe and referenced from within the report. Hence, you end up in your current
directory with both, a LaTeX file report.tex
and a PDF file report.pdf
.
For more details, including how to customise reports, have a look at the
documentation of the aspecd.report
module of the ASpecD framework.
Module documentation¶
-
class
trepr.report.
ExperimentalDatasetLaTeXReporter
(template='', filename='')¶ Bases:
aspecd.report.LaTeXReporter
Generate a report based on a LaTeX template provided.
An example for using the
trepr.report.LaTeXReporter
class may look like this:template_ = 'path/to/your/template.tex' report_output = 'path/to/your/report_output.tex' dataset_ = trepr.dataset.ExperimentalDataset() report = LaTeXReporter(template_, report_output) report.dataset = dataset_ report.create() report.compile()
- Parameters
-
dataset
¶ Dataset structure containing raw dat as well as metadata.
Deprecated since version 0.1: Use the
aspecd.report.LatexReporter
instead-
create
()¶ Perform all methods to generate a report.