Class that defines the Changelog Table in the Generic Report
ChangelogTable.Rd
This R6 class controls one row of the Changelog table that documents the date, version, reason and what changed in the update on the document. It uses the ChangelogTableRow class to manage the different rows in the table, and control the checks
Methods
Method add_row()
Takes an object of class ChangelogTableRow. as input and adds it to the list of rows.
Examples
ctr <- ChangelogTableRow$new(
date = '01-Oct-2024',
version = 'Initial version',
why_update = 'Create first version of the document',
what_changed = 'Document creation')
changelog_table <- ChangelogTable$new()
changelog_table$add_row(ctr)
Method to_dataframe()
Create a dataframe from all the rows in the row
Examples
ctr <- ChangelogTableRow$new(
date = '01-Oct-2024',
version = 'Initial version',
why_update = 'Create first versoin of the document',
what_changed = 'Document creation')
changelog_table <- ChangelogTable$new()
changelog_table$add_row(ctr)
changelog_table$to_dataframe()
Method get_table()
Generates the changelog table usin to_dataframe()
Examples
ctr_1 <- ChangelogTableRow$new(
date = '01-Oct-2024',
version = 'Initial version',
why_update = 'Create first versoin of the document',
what_changed = 'Document creation')
ctr_2 <- ChangelogTableRow$new(
date = '15-Oct-2024',
version = 'Final version',
why_update = 'Change calculation of param 1',
what_changed = 'Section 2')
changelog_table <- ChangelogTable$new()
changelog_table$add_row(ctr_1)
changelog_table$add_row(ctr_2)
changelog_table$get_table()
Examples
## ------------------------------------------------
## Method `ChangelogTable$add_row`
## ------------------------------------------------
ctr <- ChangelogTableRow$new(
date = '01-Oct-2024',
version = 'Initial version',
why_update = 'Create first version of the document',
what_changed = 'Document creation')
changelog_table <- ChangelogTable$new()
changelog_table$add_row(ctr)
## ------------------------------------------------
## Method `ChangelogTable$to_dataframe`
## ------------------------------------------------
ctr <- ChangelogTableRow$new(
date = '01-Oct-2024',
version = 'Initial version',
why_update = 'Create first versoin of the document',
what_changed = 'Document creation')
changelog_table <- ChangelogTable$new()
changelog_table$add_row(ctr)
changelog_table$to_dataframe()
#> Date Version Why we changed it
#> 1 01-Oct-2024 Initial version Create first versoin of the document
#> What changed
#> 1 Document creation
## ------------------------------------------------
## Method `ChangelogTable$get_table`
## ------------------------------------------------
ctr_1 <- ChangelogTableRow$new(
date = '01-Oct-2024',
version = 'Initial version',
why_update = 'Create first versoin of the document',
what_changed = 'Document creation')
ctr_2 <- ChangelogTableRow$new(
date = '15-Oct-2024',
version = 'Final version',
why_update = 'Change calculation of param 1',
what_changed = 'Section 2')
changelog_table <- ChangelogTable$new()
changelog_table$add_row(ctr_1)
changelog_table$add_row(ctr_2)
changelog_table$get_table()
Date
Version
Why we changed it
What changed
01-Oct-2024
Initial version
Create first versoin of the document
Document creation
15-Oct-2024
Final version
Change calculation of param 1
Section 2