Skip to content

Commit

Permalink
Add function to update morphology metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
drodarie committed Jul 26, 2023
1 parent bc6692c commit f5ceb2f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bsb_hdf5/morphology_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ def get_all_meta(self, handle=HANDLED):
return {}
return json.loads(handle["morphology_meta"][()], object_hook=meta_object_hook)

@handles_handles("a")
def update_all_meta(self, meta, handle=HANDLED):
all_meta = self.get_all_meta(handle=handle)
all_meta.update(meta)
self.set_all_meta(all_meta, handle=handle)

@handles_handles("a")
def set_all_meta(self, all_meta, handle=HANDLED):
if "morphology_meta" in handle:
Expand Down

0 comments on commit f5ceb2f

Please sign in to comment.