
Validate an expert classification file
resy_validate_esy.RdChecks an ESy expert file (`.txt` or `.json`) for structural and syntactic problems. Does not assess ecological correctness. The rules are:
**Errors** (always fatal — the file cannot be imported):
All required sections / top-level keys must be present and, for `.txt`, in the correct order (Section 1 < 2 < 3).
Every vegetation type must have a non-empty code with no whitespace.
Every vegetation type must have a formula / expression.
Every formula must contain at least one membership condition
<...>.Brackets inside formulas must be balanced (
(),[],{}).Priority must be a single character in
0-9,A-Zora-z.Group keys in Section 2 /
"groups"must start with a recognised prefix (###,##D,#TC,#SC,$$C,$$N).
**Warnings** (errors when strict = TRUE):
Duplicate vegetation type codes.
Group names referenced in formulas that are not defined.
Dangling logical operators (
AND/OR/NOTat the start or end of a formula).Legacy relational operator
UP(deprecated in JUICE 7.0).For `.txt`: relational operators found outside
<...>angle brackets.For `.json`: missing or empty
metadata.scheme/metadata.version.Empty description for a vegetation type.