Skip to main content

A general purpose reporting generator for Chaos Toolkit

Build, Test, and Lint

The Chaos Toolkit reporting extension library.

Purpose

The purpose of this library is to provide reporting support to the Chaos Toolkit experiment results.

Features

The library takes the journal generated by the chaos run command and transforms into a human friendly report. The report can be a standalone PDF or HTML document.

Install

Install this package as any other Python packages:

$ pip install -U chaostoolkit-reporting

Notice that this draws a few dependencies:

Some of them are LGPL v3 licensed.

You will also need to install some additional dependencies that the chaos report command relies upon.

Usage

Once installed, a new report subcommand will be made available to the chaos command, use it as follows:

$ chaos report --export-format=html5 journal.json report.html

or, for a PDF document:

$ chaos report --export-format=pdf journal.json report.pdf

You can also generate a single report from many journals at once:

$ chaos report --export-format=pdf journal-1.json journal-2 journal-3 report.pdf

Or more succinctly:

$ chaos report --export-format=pdf journal-*.json report.pdf

Download a Docker Image

As the dependencies for this plugin can be difficult to get right, we also provide a docker image - note that this image is rather big with 1.4Gb to pull. You can install Docker from the Docker Hub.

$ docker pull chaostoolkit/reporting

Use a Docker container

To generate a PDF report using the Docker image you must first ensure that you are running the command from where the journal.json file, generated during an experiment run, can be found. To check for this you can run:

$ ls

And you should see the journal.json file:

journal.json

Now you can run the docker command:

$ docker run \
    --user `id -u` \
    -v `pwd`:/tmp/result \
    -it \
    chaostoolkit/reporting

This will create chaostoolkit.log and report.pdf files in this directory.

$ ls
chaostoolkit.log   journal.json   report.pdf

The report.json file will be owned by the user id returned by the command id -u, it should be your user. The reason we specify a user is that, by default, the container runs as root and the image doesn't make a guess about which user will run the container. If you don't have the id command you can set the value manually as follows instead: --user 1000:1000 assuming both your user and group ids are 1000.

The default command of the image is equivalent to running this without a container:

$ chaos report --export-format=pdf journal.json report.pdf

If you wish to override that command, pass the chaos report parameters as follows:

$ docker run \
    --user `id -u` \
    -v `pwd`:/tmp/result \
    -it \
    chaostoolkit/reporting -- report --export-format=html5 journal.json report.html

And the same files will be created:

$ ls
chaostoolkit.log   journal.json   report.pdf

Contribute

Contributors to this project are welcome as this is an open-source effort that seeks discussions and continuous improvement.

From a code perspective, if you wish to contribute, you will need to run a Python 3.7+ environment. Then, fork this repository and submit a PR. The project cares for code readability and checks the code style to match best practices defined in PEP8. Please also make sure you provide tests whenever you submit a PR so we keep the code reliable.

Metadata

Release files for chaostoolkit-reporting 0.18.0

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

Source distribution (sdist)

Source distribution for chaostoolkit-reporting 0.18.0
File Size Uploaded Provenance Actions
chaostoolkit_reporting-0.18.0.tar.gz 26.0 kB With provenance Details for chaostoolkit_reporting-0.18.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chaostoolkit-reporting 0.18.0
File Interpreter ABI Platform Actions
chaostoolkit_reporting-0.18.0-py3-none-any.whl Python 3 none any Details for chaostoolkit_reporting-0.18.0-py3-none-any.whl

Total release size: 55.4 kB

Release files / chaostoolkit_reporting-0.18.0.tar.gz

Download URL chaostoolkit_reporting-0.18.0.tar.gz
Size 26.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f3f2f5980d53ac7b22e781255a030f20d28fee4f80bff9e8978a67753c5bafba
BLAKE2b-256 checksum
How to use checksums
f4107e0556fd7c863b8543d47a39b11aeafa1feafd3376822f18f25cb99114ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2024.

Transparency log

Release files / chaostoolkit_reporting-0.18.0-py3-none-any.whl

Download URL chaostoolkit_reporting-0.18.0-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c80ef21036e91bbba36389736b0e991e4adf5b3f123d6a4945c91d08dd4ec486
BLAKE2b-256 checksum
How to use checksums
427b30d346eb4cce9bdfaf37f9a4caed1bf68cbeb1f0a589b4fccb81c14e4d56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2024.

Transparency log

Security for chaostoolkit-reporting 0.18.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for chaostoolkit_reporting-0.18.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2024.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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