Skip to content

Metadata can appear to be set directly, but doesn't work: unfriendly to the user  #993

Closed as not planned
@hyanwong

Description

@hyanwong

I see that it looks like I can set metadata properties after creating them, but it doesn't actually update the metadata. I think it should either work, or we should raise an error if possible:

tables = tskit.TableCollection(1)
tables.metadata_schema = tskit.MetadataSchema({"codec":"json"})
tables.metadata = {'foo': {}}
tables.metadata['foo']['bar']=20
ts = tables.tree_sequence()
print(ts.metadata['foo']) # doesn't return 20

Metadata

Metadata

Assignees

No one assigned

    Labels

    Python APIIssue is about the Python APIenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions