metrumresearchgroup / yspec

Data Specification for Pharmacometrics
https://metrumresearchgroup.github.io/yspec
5 stars 2 forks source link

Bug when multiple namespaced items #81

Closed kylebaron closed 2 years ago

kylebaron commented 2 years ago

Summary

As a user, I want yspec to properly handle multiple namespaced fields

Tests

kylebaron commented 2 years ago
> library(yspec)
> x <- ys_load("tests/testthat/spec/namspace-multiple.yml")
decode is not the correct length:
Error in validate_namespace_decode(col_name, namespace) : 
  argument "col_name" is missing, with no default
> readLines("tests/testthat/spec/namspace-multiple.yml")
 [1] "TIME:"                                                
 [2] "  short: time"                                        
 [3] "  unit: hr"                                           
 [4] "STUDY: "                                              
 [5] "  short: study name"                                  
 [6] "  short.plot: study ID"                               
 [7] "  values: [1,2,3]"                                    
 [8] "  decode: [\"Phase 1\", \"Phase 2\", \"Phase 3\"]"    
 [9] "  decode.lc: [ \"phase 1\", \"phase 2\", \"phase 3\"]"
[10] "HT: "                                                 
[11] "  short: height"                                      
[12] "  unit: cm"