Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New pybel breaks indra dependencies in BEL to Natural Language #17

Open
djinnome opened this issue Jul 12, 2020 · 3 comments
Open

New pybel breaks indra dependencies in BEL to Natural Language #17

djinnome opened this issue Jul 12, 2020 · 3 comments

Comments

@djinnome
Copy link

The latest version of pybel breaks indra dependencies in the BEL to Natural Language notebook

pybel.get_version()

'0.14.11-dev'

indra.util.get_version.get_version()

'1.17.0-c8f35a6f7a00e8a6116b707b6a034f57a72f22ae'

pbp = process_pybel_graph(sialic_acid_graph)
pbp.statements
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-17-2420ef54593c> in <module>
----> 1 pbp = process_pybel_graph(sialic_acid_graph)
      2 pbp.statements

~/Projects/Proposals/MARS/Pathogenesis/indra/indra/sources/bel/api.py in process_pybel_graph(graph)
    150     """
    151     bp = PybelProcessor(graph)
--> 152     bp.get_statements()
    153     if bp.annot_manager.failures:
    154         logger.warning('missing %d annotation pairs',

~/Projects/Proposals/MARS/Pathogenesis/indra/indra/sources/bel/processor.py in get_statements(self)
     90             for node_ix, node in enumerate((u_data, v_data)):
     91                 if isinstance(node, dsl.ComplexAbundance):
---> 92                     self._get_enum_complex(u_data, v_data, k, d, node_ix)
     93             subj_activity = _get_activity_condition(d.get(pc.SUBJECT))
     94             obj_activity = _get_activity_condition(d.get(pc.OBJECT))

~/Projects/Proposals/MARS/Pathogenesis/indra/indra/sources/bel/processor.py in _get_enum_complex(self, u_data, v_data, k, edge_data, node_ix)
    187         cplx_agent.bound_conditions = []
    188         agents.append(cplx_agent)
--> 189         ev = self._get_evidence(u_data, v_data, k, edge_data)
    190         stmt = Complex(agents, evidence=[ev])
    191         self.statements.append(stmt)

~/Projects/Proposals/MARS/Pathogenesis/indra/indra/sources/bel/processor.py in _get_evidence(self, u_data, v_data, k, edge_data)
    327         ev_pmid = None
    328         if ev_citation:
--> 329             cit_type = ev_citation[pc.CITATION_DB]
    330             cit_ref = ev_citation[pc.CITATION_IDENTIFIER]
    331             if cit_type == pc.CITATION_TYPES[pc.CITATION_TYPE_PUBMED]:

AttributeError: module 'pybel.constants' has no attribute 'CITATION_DB'
@djinnome
Copy link
Author

djinnome commented Jul 12, 2020

I left a pull request on INDRA to handle the location change of citation_dict which was causing an ImportError on this line in BEL to Natural Language:

from indra.sources.bel.api import process_pybel_graph

@djinnome
Copy link
Author

It's too bad that the notebooks can't be on continuous integration, or you probably would have caught this bug.

@cthoyt
Copy link
Member

cthoyt commented Jul 13, 2020

Hi @djinnome, I'd suggest you stay on stable versions of PyBEL that are released on PyPI. I can't support users on the development version, especially right now as v0.15.0 will have some breaking changes (as you've found)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants