Skip to content

Commit a94f818

Browse files
authored
Merge pull request #325 from clamsproject/develop
releasing 1.1.2
2 parents 75ee8b3 + 4c8a890 commit a94f818

File tree

3 files changed

+889709
-3
lines changed

3 files changed

+889709
-3
lines changed

mmif/serialize/view.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ def _fix_old_short_ids(self):
8383
propv = self.metadata.contains[annotation.at_type][propk]
8484
if isinstance(propv, list):
8585
for i, item in enumerate(propv):
86-
if propv not in mmif_docs and self.id_delimiter not in item:
86+
if item not in mmif_docs and self.id_delimiter not in item:
8787
propv[i] = f"{self.id}{self.id_delimiter}{item}"
8888
if propk in annotation.properties:
8989
propv = annotation.properties[propk]
9090
if isinstance(propv, list):
9191
for i, item in enumerate(propv):
92-
if propv not in mmif_docs and self.id_delimiter not in item:
92+
if item not in mmif_docs and self.id_delimiter not in item:
9393
propv[i] = f"{self.id}{self.id_delimiter}{item}"
9494
self.annotations.append(annotation)
9595

tests/mmif_examples.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
old_mmif_w_short_id = f"https://raw.githubusercontent.com/clamsproject/mmif/1.0.5/specifications/samples/everything/raw.json"
1616
EVERYTHING_JSON = request.urlopen(everything_file_url).read().decode('utf-8')
1717
OLD_SHORTID_JSON = request.urlopen(old_mmif_w_short_id).read().decode('utf-8')
18+
SWT_1_0_JSON = open('tests/samples/1.0/swt.mmif').read()
1819

1920
# for keys and values in chain all typevers in mmif.vocabulary.*_types modules
2021
# merge into a single dict
@@ -24,7 +25,8 @@
2425

2526
MMIF_EXAMPLES = {
2627
'everything': Template(EVERYTHING_JSON),
27-
'old_shortid': Template(OLD_SHORTID_JSON),
28+
'mmif_old_shortid': Template(OLD_SHORTID_JSON),
29+
'mmif_swt_1_0': Template(SWT_1_0_JSON),
2830
}
2931
FRACTIONAL_EXAMPLES = {
3032
'doc_only': Template("""{

0 commit comments

Comments
 (0)