module 'fastobo.typedef' has no attribute 'IsMetadataClause'
cmungall opened this issue · 2 comments
cmungall commented
when trying to save:
[Typedef]
id: never_in_taxon
name: never_in_taxon
def: "S never_in_taxon T iff: S SubClassOf in_taxon only not T." [PMID:20973947]
xref: RO:0002161
expand_assertion_to: "Class: <http://www.w3.org/2002/07/owl#Nothing> EquivalentTo: ?X and (RO_0002162 some ?Y)" []
is_metadata_tag: true
is_class_level: true
I get a an error:
Traceback (most recent call last):
File "/Users/cjm/repos/ontology-access-kit/tests/test_implementations/test_pronto.py", line 32, in test_obo_json
json_oi.store(OntologyResource(slug='go-nucleus.from-json.obo', directory=OUTPUT_DIR, local=True, format='obo'))
File "/Users/cjm/repos/ontology-access-kit/src/oaklib/implementations/pronto/pronto_implementation.py", line 86, in store
ontology.dump(f, format=resource.format)
File "/Users/cjm/Library/Caches/pypoetry/virtualenvs/oaklib-OeQZizwE-py3.9/lib/python3.9/site-packages/pronto/ontology.py", line 405, in dump
cls(self).dump(file) # type: ignore
File "/Users/cjm/Library/Caches/pypoetry/virtualenvs/oaklib-OeQZizwE-py3.9/lib/python3.9/site-packages/pronto/serializers/obo.py", line 37, in dump
frame = self._to_typedef_frame(Relationship(self.ont, data))
File "/Users/cjm/Library/Caches/pypoetry/virtualenvs/oaklib-OeQZizwE-py3.9/lib/python3.9/site-packages/pronto/serializers/_fastobo.py", line 279, in _to_typedef_frame
frame.append(fastobo.typedef.IsMetadataClause(True))
AttributeError: module 'fastobo.typedef' has no attribute 'IsMetadataClause'
althonos commented
Hi Chris, thanks for the bug report. I fixed it (it was simply renaming IsMetadataClause
to IsMetadataTagClause
) and am now releasing a new patch version.
althonos commented
Should work in v2.4.5
(I added a regression test).