Gilead-BioStats / gsm

Good Statistical Monitoring R Package
https://gilead-biostats.github.io/gsm/
Apache License 2.0
39 stars 9 forks source link

Bugfix: Optional Columns in 1st Combined Spec #1924

Closed jonthegeek closed 2 weeks ago

jonthegeek commented 3 weeks ago

Expected Behavior

If I try to combine two specs, and 1 has optional columns, there isn't a problem.

Current Behavior

If the first spec has a df with an optional column, CombineSpec throws an error. If the second spec has an optional column that isn't in the first step, it seems to work, but I suspect it doesn't really.

Possible Solution

Fixed, PRing in a sec.

Steps to Reproduce

spec1 <- list(
  df1 = list(
    col1 = list(required = TRUE),
    col2 = list(required = FALSE)
  )
)

spec2 <- list(
  df1 = list(
    col3 = list(required = TRUE)
  )
)

combined <- CombineSpecs(list(spec1, spec2), bIsWorkflow = FALSE)

Context (Environment)

Possible Implementation

Additional Comments