Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLATTEN-ENCODING] Make encoding of Document less nested and easier to write #1995

Open
blythed opened this issue Apr 18, 2024 · 0 comments
Open
Labels

Comments

@blythed
Copy link
Collaborator

blythed commented Apr 18, 2024

As a user specifying a Stack or Component using the Document formalism, I don't want deep nesting, rather shallow nesting, so that it's possible to easily write these specifications in yaml without too much trouble and mental gymnastics.

Specification:

_leaves
  - identifier: 123231ae1f212567896343444
    cls: Artifact
    module: superduperdb.components.datatype
    dict:
      datatype: pil_image

x: $_leaves[-1]

This would give a decoding as a Document.unpack() of {'x': <PIL.Image.PNGImagePlugin 1234x3>}.
This can be applied to all objects which require encoding.

@blythed blythed added the story label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant