You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dummyVariable naming convention in metadata_registry.yaml and variable_details.yaml has been updated on the diet-score branch to match actual practice. The old schema allowed patterns that are no longer correct.
Old regex: ^[a-zA-Z0-9_]+_(cat|cont)[0-9]+(_[0-9]+|_NA::[a-z])?$
New categorical regex: ^[a-zA-Z0-9_]+_cat[0-9]+(_[0-9]+|_NA[a-z])$
Continuous/Func rows: N/A
Added missing_categories examples (_NAa, _NAb)
Removed _cont{N} examples (not used in practice)
inst/metadata/schemas/core/variable_details.yaml:
Updated dummyVariable notes to match new convention
Removed _cont{N} examples
Added _NAa/_NAb examples
What changed
No colons — _NAa and _NAb instead of _NA::a and _NA::b
No _cont pattern — continuous variables use N/A
Func rows use N/A — not a constructed name
Propagation needed
These schema files exist on multiple branches under review. The updated schema needs to be propagated to:
v3-smoking (smoking harmonization)
main (after current PRs merge)
Any other active feature branches
The cchsflow-review SKILL.md (Check 5b) enforces the correct convention regardless of which schema version is on the branch, so this is not blocking reviews.
Related
PR diet score #148 (diet variables) — where the discrepancy was discovered
cchsflow-review SKILL.md Check 5b documents the convention
Summary
The
dummyVariablenaming convention inmetadata_registry.yamlandvariable_details.yamlhas been updated on thediet-scorebranch to match actual practice. The old schema allowed patterns that are no longer correct.Changes made (diet-score branch)
inst/metadata/documentation/metadata_registry.yaml:^[a-zA-Z0-9_]+_(cat|cont)[0-9]+(_[0-9]+|_NA::[a-z])?$^[a-zA-Z0-9_]+_cat[0-9]+(_[0-9]+|_NA[a-z])$N/Amissing_categoriesexamples (_NAa,_NAb)_cont{N}examples (not used in practice)inst/metadata/schemas/core/variable_details.yaml:dummyVariablenotes to match new convention_cont{N}examples_NAa/_NAbexamplesWhat changed
_NAaand_NAbinstead of_NA::aand_NA::b_contpattern — continuous variables useN/AN/A— not a constructed namePropagation needed
These schema files exist on multiple branches under review. The updated schema needs to be propagated to:
v3-smoking(smoking harmonization)main(after current PRs merge)The
cchsflow-reviewSKILL.md (Check 5b) enforces the correct convention regardless of which schema version is on the branch, so this is not blocking reviews.Related
cchsflow-reviewSKILL.md Check 5b documents the convention