RacimoLab / demes-r

R library for parsing Demes demographic models
Other
0 stars 2 forks source link

Correctly parse all valid test cases #9

Closed IsabelMarleen closed 1 year ago

IsabelMarleen commented 1 year ago

Except for these four valid test cases ("toplevel_defaults_deme_01.yaml", "successors_predecessors_01.yaml", "deme_end_time_01.yaml", "unicode_deme_name_04.yaml"), all valid test cases in the deme spec can now be parsed correctly and pass all tests.

The files that cannot be parsed correctly are for reasons outside the validate_demes() function. The first three don't pass because they have a deme named "y" and that is interpreted as TRUE in yaml 1.1 which is what the yaml reader is based on. For the last one it is the pre-parsed file that causes issues. It cannot be read by yaml::read_yaml without causing an error unless fileEncoding = UTF-16 is specified.

bodkan commented 1 year ago

Incredible work, @IsabelMarleen! What an epic accomplishment for just the first month of your Master's thesis. 👏