Reporting Functions

Previously in PPC Robot, each report was composed from a set of steps that were executed in order to generate the report. This system was counter-intuitive, hard to debug, and had limited capabilities. New reports should be written in a new function-based model.

Each report type has a function called execute(). This function replaces the previous create_steps(), but instead of returning/generating steps, it should just execute the report - load data, transform them and generate output.

One of the main advantages is that you have direct access to the data stored in DataFrames. This enables you to perform any operation that is available in pandas, without having to write unnecessary functions just to perform some specific operation. Another advantage is that you can easily add conditions to the report that changes the processing according to the data loaded.

To aid with the report execution and to provide common set of useful operations, several helper functions are available.