Skip to content

feat: missing values as objects (DPv2) - #1787

Merged
pierrecamilleri merged 10 commits into
mainfrom
feat/missing-values-dp2
Jun 23, 2026
Merged

feat: missing values as objects (DPv2)#1787
pierrecamilleri merged 10 commits into
mainfrom
feat/missing-values-dp2

Conversation

@pierrecamilleri

@pierrecamilleri pierrecamilleri commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Allow for DPv2 missing values as objects with labels.

Features :

Global architecture approach

  • Class deserializing support the superset of v1 and v2
  • Class properties are as most as possible only v2 properties, not storing the initial version if read from a descriptor. Round-trip of deserializing and reserializing will therefore return a canonical descriptor, possibly different from original input. This canonical form is however, idempotent (deserializing and reserializing gives the same descriptor).
  • Class validation however needs to know the version (possibly inherited) to validate accordingly

Descriptor validation

  • implementation handles v1 and v2. Validation triggers an error if using objects with explicit v1. Lenient validation : if no $schema is provided, no error is reported (despite the DP reference stating that default value is v1). Custom schemas/profiles are considered v2 by default.
  • Unicity of values and labels validated
    • Unicity of "strings" in case of a list of strings is not validated, as this would be a non-essential breaking change

Sidenote

Reference does not seem to explicitely forbid that Package and Schema have contradicting $schema properties. However, this should not be a feature, so current implementation gives precedence on the parent's version.

TODO

  • Version inheritence in metadata_validate

@pierrecamilleri
pierrecamilleri merged commit 7a043ff into main Jun 23, 2026
10 checks passed
@pierrecamilleri
pierrecamilleri deleted the feat/missing-values-dp2 branch June 23, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant