biolink / ontobio

python library for working with ontologies and ontology associations
https://ontobio.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
119 stars 30 forks source link

Fix circular import reference between collapsed_assoc and errors #568

Closed dustine32 closed 3 years ago

dustine32 commented 3 years ago

Running make test produces this error:

ERROR tests/test_gocamgen.py - AttributeError: module 'ontobio.rdfgen.gocamgen.collapsed_assoc' has no attribute 'CollapsedAssocia...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I traced this to gocamgen.collapsed_assoc importing gocamgen.errors, which imports gocamgen.collapsed_assoc, and so on... https://github.com/biolink/ontobio/blob/f7c8d25aba9e69a830b7ac15b89185609d2ad314/ontobio/rdfgen/gocamgen/collapsed_assoc.py#L5 https://github.com/biolink/ontobio/blob/f7c8d25aba9e69a830b7ac15b89185609d2ad314/ontobio/rdfgen/gocamgen/errors.py#L1 https://github.com/biolink/ontobio/blob/f7c8d25aba9e69a830b7ac15b89185609d2ad314/ontobio/rdfgen/gocamgen/errors.py#L21

Just need to reorganize a bit.

Tagging @sierra-moxon