Skip to content

v0.0.8

Choose a tag to compare

@selmanozleyen selmanozleyen released this 02 Oct 12:49
· 51 commits to main since this release
21895e8

Added

  • registry on pydantic: a Component is a frozen pydantic model, and a spec is {"type": type_id, "version": n, **fields} JSON. @component(type_id, version=, versions=) registers it; a field typed as a family base parses any registered member, so families stay open to other packages, and each member is written with its own fields
  • @component(type_id, builds=Impl) links a config to its implementation (registry.config_of)
  • data.SamplerParams: a small model of the sampler settings, passed as sampler= (or a plain mapping) to Loader and Loader.from_paths, with per-stream overrides in stream_samplers=

Removed

  • cattrs and attrs
  • The {type, version, config} envelope
  • registry.register_live: anything a spec cannot hold (a live object, or a value that does not read back) raises PortabilityError when the spec is written
  • registry.build, Component.build and Component.build_spec: each family declares its own typed build
  • data.SamplerKwargs, the batch_size / chunk_size / preload_nchunks keywords, and sampler settings on Stream: pass sampler= / stream_samplers= to the loader

Fixed

  • registry: components inside dict, list and tuple fields keep their type through to_spec / parse (#14)