Skip to content

Commit f0256b8

Browse files
committed
Clean up.
1 parent a4caa39 commit f0256b8

2 files changed

Lines changed: 0 additions & 26 deletions

File tree

src/hermes/model/prov/ld_prov.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -102,24 +102,3 @@ def __init__(self, parent_prov, data=None, *, parent=None, key=None, context=Non
102102

103103
def finish(self):
104104
self.parent_prov.item_list.extend(self.item_list)
105-
106-
107-
if __name__ == '__main__':
108-
from pprint import pprint
109-
110-
harvest_cache = Path.cwd() / ".hermes" / "harvest"
111-
112-
loader = BundledLoader(preload=True)
113-
jsonld.set_document_loader(loader)
114-
cff_prov_doc = ld_prov()
115-
116-
ld_record_call.prov_doc = cff_prov_doc
117-
cff_file_path = harvest_cache / "cff" / "data.json"
118-
119-
cff_codemeta = ld_dict.from_file(cff_file_path)
120-
cff_prov_doc.attach(cff_codemeta)
121-
122-
result = cff_codemeta.compact()
123-
124-
for node in cff_prov_doc.data:
125-
pprint(node.to_python())

src/hermes/model/types/ld_dict.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ def from_dict(cls, value, *, parent=None, key=None, context=None, ld_type=None):
8686

8787
return ld_value
8888

89-
@classmethod
90-
def from_file(cls, path):
91-
json_data = json.load(path.open('rb'))
92-
return cls.from_dict(json_data)
93-
9489
@classmethod
9590
def is_ld_dict(cls, ld_value):
9691
return cls.is_ld_node(ld_value) and cls.is_json_dict(ld_value[0])

0 commit comments

Comments
 (0)