-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from indralab/shared-representation-export-im…
…provements Update metadata for shared representations
- Loading branch information
Showing
3 changed files
with
18 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def add_metadata_annotations(metadata, model): | ||
annotations_subset = { | ||
k: v | ||
for k, v in model.template_model.annotations.dict().items() | ||
if k not in ["name", "description"] | ||
# name and description already have a privileged place | ||
# in the petrinet schema so don't get added again | ||
} | ||
if annotations_subset: | ||
metadata['annotations'] = annotations_subset |