Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the
Deserializer
type (see #9). It's currently a lazyAbstractDict{String,ProteinStructure}
, and deviates slightly from the original suggestion in that you iterate through the structures usingvalues(deserializer)
, defined implicitly by explicitly definingBase.keys
andBase.iterate
.As mentioned in #9, I'm also considering some kind of
Serializer
type for appending structures to files, but this can already be done withserialize(path, structures; mode="cw")
. Still, the current interface provides no way to e.g. delete an entry without importing HDF5. ASerializer
type could implementBase.delete!(serializer, key)
method -- or should serializers strictly write, in the same way deserializers strictly read?Should also reconcile the overlap between this and my make shift
ProteinDataset
type from #9. Thedeserialize
function could be implemented ascollect(values(Deserializer(filename)))
.The commit also includes some minor package reformatting.