cisagov / pe-reports

Automated process to build and distribute Posture & Exposure Reports' bi-weekly to customers.
Creative Commons Zero v1.0 Universal
17 stars 5 forks source link

Update report generator to use reportlab #565

Closed DJensen94 closed 9 months ago

DJensen94 commented 1 year ago

Fixes #420

🗣 Description

Our current report generator uses an html template and then converts the html into a pdf report. The library that does the transformation does not have enough features to implement the fonts and dynamic spacing our reports require. This means we will have to redesign the report generation process using a new library.

Motivation

This is change is required to have our reports meet the CISA style guide and also make our reports more robust as we have had issues where complete charts have vanished due to sizing issues.

🧪 Testing

Reports are correctly generated without any missing visuals
 Fonts are correctly displayed

✅ Pre-approval checklist

coveralls commented 1 year ago

Coverage Status

coverage: 33.736% (+7.0%) from 26.737% when pulling b0ce88b5555a40f50c0100fbb489b9eb6b6222c3 on DJ_Reportlab_generator_PR into 998fa208fc9f91848d0122e5af21264f1af8ee27 on develop.

DJensen94 commented 1 year ago

@jsf9k after merging Develop into this branch to get them in sync, the ansible lint check started failing, I don't think that is an issue on our end. Any ideas on that issue?

jsf9k commented 1 year ago

@jsf9k after merging Develop into this branch to get them in sync, the ansible lint check started failing, I don't think that is an issue on our end. Any ideas on that issue?

This failure is due to some upstream changes. The next set of Lineage changes that trickle down should fix the problem.

dav3r commented 10 months ago

@DJensen94 While you are waiting for the remaining reviews, you can merge the latest changes from develop into this branch to ensure there are no issues there?

dav3r commented 10 months ago

@DJensen94 - For future reference, I suggest you use the batch functionality to accept and commit multiple similar/related suggestions (e.g. https://github.com/cisagov/pe-reports/pull/565/commits/4a4b7562bdaa84300e6c60c123e0ecfd57af00e0, https://github.com/cisagov/pe-reports/pull/565/commits/40f073f6e8457e91f608215b2dde417cc1343061, https://github.com/cisagov/pe-reports/pull/565/commits/e2502bb64051237916f7a878dc2481abf552e37f, etc.)

This would reduce the number of commits you need to make in cases like this.