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
{{ message }}
Repository navigation
zarr-metadata: Scope.update() replaces slots whole; adding a definition can silently drop the defaults #424
Scope.update() replaces each slot whole: passing data_types=[NEW_DEFINITION] silently drops every default data type from the scope rather than adding one. Extending the default scope requires re-splicing the defaults by hand:
Encountered while extending CORE_AND_EXTENSIONS for GeoZarr validation in EOPF-Explorer/data-model#330. The failure mode of getting it wrong is nasty for exactly this API's audience: with strict validation on, a scope that silently lost its defaults blames every ordinary document for "unclaimed" core names, and the error points at the store, not at the scope construction.
The ask: an additive operation — scope.extend(data_types=[...]), or merge semantics on update — so adding a definition cannot drop the existing ones. If update's replace-whole semantics are intentional, a note in its docstring showing the splice idiom would at least make the footgun visible.
Activity
feat(zarr-metadata)!: replace scope update with copy(update=...) and …