dhimmel / obonet

OBO-formatted ontologies → networkx (Python 3)
https://github.com/dhimmel/obonet/blob/main/examples/go-obonet.ipynb
Other
136 stars 28 forks source link

Handle case where no header is found #26

Closed cthoyt closed 1 year ago

cthoyt commented 1 year ago

The header value is only assigned within a conditional, so when parsing sketchy ontologies that don't have properly written headers, it ends up giving an exception like cannot access local variable 'header' where it is not associated with a value. This PR changes that to send a warning instead and let the program move on. Alternatively, this could be a place to issue a proper exception

dhimmel commented 1 year ago

I'll make a release too

cthoyt commented 1 year ago

Thank you @dhimmel !

dhimmel commented 1 year ago

https://pypi.org/project/obonet/0.3.1/