phuse-org / valtools

Validation framework for R packages used in clinical research and drug development.
https://phuse-org.github.io/valtools/
Other
51 stars 10 forks source link

roxygen tag for coverage #49

Closed thebioengineer closed 3 years ago

thebioengineer commented 3 years ago

@coverage <- similar to @section

#' @section Specification coverage:
#' 7.1: 007.7.1, 007.7.2 
#' 7.2: 007.7.1, 007.7.2 
thebioengineer commented 3 years ago

dynamic referencing:

#' @section Specification coverage:
#' ##tc:my_test_case.1: ##req:my_requirement.1, ##req:my_requirement.2 
#' ##tc:my_test_case.2: ##req:my_requirement.1, ##req:my_requirement.2 
mariev commented 3 years ago

question raised during Teams mtg:

what happens if the ##tc label w/i roxygen block is earlier then mention in the test case block? I.e. if we have the case below, will the bullet be 1 or 2?

#' @coverage
#' ##tc:test_case_A: ##req:req_a, ##req:req_b
#' ##tc:test_case_B: ##req:req_a, ##req:req_b

+ _Test Cases_
     + T##tc:test_case_B Create a test case
thebioengineer commented 3 years ago

TODO: update dynamic referencing to ignore text in roxygen header comments when determining order of cases. in example above, ##tc:text_case_B would render as 2 right now, which is non-sensical.

thebioengineer commented 3 years ago

Coverage tag in #51 - once merged we can close this issue Addressed dynamic referencing in #55