Giter Site home page Giter Site logo

joaoasrosa / chaostoolkit-reporting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chaostoolkit/chaostoolkit-reporting

0.0 0.0 0.0 60 KB

Reporting plugin for chaostoolkit journal results

License: Apache License 2.0

Python 83.12% CSS 10.39% JavaScript 0.01% Shell 2.58% Dockerfile 3.90%

chaostoolkit-reporting's Introduction

chaostoolkit-reporting

Build Status

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.

If you are using Mac OS X then you will need to install some additional dependencies that the chaos report command relies upon.

You will also need to install the pandoc package on your system.

If you intend on creating PDF reports, the following additional packages will be needed:

$ sudo apt-get install texlive-latex-base \
    texlive-fonts-recommended \
    texlive-fonts-extra \
    texlive-latex-extra \
    pdflatex

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.

$ docker pull chaostoolkit/reporting

Usage

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

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

or, for a PDF document:

$ chaos report --export-format=pdf chaos-report.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 succintly:

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

Use a Docker container

To generate a PDF report using the Docker image:

$ ls .
journal.json

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

$ ls .
journal.json report.pdf chaostoolkit.log

As you can see, you should run that command from where the journal.json file, generated during an experiment run, can be found. This will create a report.pdf in this directory.

The 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

$ ls .
journal.json report.html chaostoolkit.log

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.5+ 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.

chaostoolkit-reporting's People

Contributors

lawouach avatar paulwilljones avatar russmiles avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.