Currently chunks are just bare dictionary objects returned from Library. this makes it hard to refactor how they're represented and what properties they have.
Related to #15 . Helpful for #56, #33, and others.
[x] Update Library.chunks() to return an array of Chunk, not a list of (chunk_id, chunk) (now that chunk.id holds the id)
[x] Have Chunk be the thing that converts the embedding from base 64 to fully expanded
[x] Have Library have an internal dict of cached id -> chunk objects
[x] Add Chunk.remove() which calls chunk.library.remove_chunk(self)
[x] chunk.str should return chunk.text
[x] Cache chunk.id() if it uses canonical id
[x] Have a Chunk.validate() that is called on chunk creation, and move the Chunk validation from Library.validate() to that (when Library is created a Chunk wrapper should be created around each)
Currently chunks are just bare dictionary objects returned from Library. this makes it hard to refactor how they're represented and what properties they have.
Related to #15 . Helpful for #56, #33, and others.