RTXteam / RTX

Software repo for Team Expander Agent (Oregon State U., Institute for Systems Biology, and Penn State U.)
https://arax.ncats.io/
MIT License
33 stars 21 forks source link

dev has pytest issues that need resolved #2262

Closed dkoslicki closed 5 months ago

dkoslicki commented 5 months ago

While merging master into dev did not result in any conflicts, there are newly failing tests:

git checkout dev
git pull origin dev
pytest -v .

FAILED test_ARAX_expand.py::test_qualified_regulates_query - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_expand.py::test_edge_constraints - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_expand.py::test_xdtd_expand - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_expand.py::test_xdtd_multiple_categories - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_expand.py::test_xdtd_different_predicates - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_expand.py::test_xdtd_curie_not_in_db - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_infer.py::test_xdtd_infer_castleman_disease_1 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_infer.py::test_xdtd_infer_castleman_disease_2 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_infer.py::test_xdtd_with_qg2 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_infer.py::test_xdtd_with_qg3 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_infer.py::test_xdtd_with_only_qg - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_json_queries.py::test_query_by_query_graph_2 - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_json_queries.py::test_ngd_added - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_query.py::test_query_by_query_graph_2 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_standup_queries.py::test_gene_to_pathway_issue_9 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_standup_queries.py::test_chemicals_to_gene_issue_10 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_standup_queries.py::test_named_thing_associated_with_acrocynaosis_issue_12 - AssertionError: assert 'ERROR' == 'OK'

@edeutsch @saramsey , any idea who "owns" the standup and json query tests?

dkoslicki commented 5 months ago

Fixed a lot of these due to a missing comma in the blocklist. The now failing tests are:

FAILED test_ARAX_expand.py::test_xdtd_expand - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_expand.py::test_xdtd_multiple_categories - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_expand.py::test_xdtd_different_predicates - AssertionError: assert ('ERROR' == 'OK'
FAILED test_ARAX_infer.py::test_xdtd_infer_castleman_disease_1 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_infer.py::test_xdtd_infer_castleman_disease_2 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_infer.py::test_xdtd_with_qg2 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_infer.py::test_xdtd_with_qg3 - AssertionError: assert 'ERROR' == 'OK'
FAILED test_ARAX_infer.py::test_xdtd_with_only_qg - AssertionError: assert 'ERROR' == 'OK'

fixed in commit https://github.com/RTXteam/RTX/commit/0f3af48b51ce4a3f6c3226017f46601b81f384ca that I forgot to reference.

So looks like this only needs attention from @chunyuma

dkoslicki commented 5 months ago

Culprit seems to be here: https://github.com/RTXteam/RTX/blob/dev/code/ARAX/ARAXQuery/Infer/scripts/ExplianableDTD_db.py#L118-L120 Where self has not response attribute

chunyuma commented 5 months ago

All xDTD tests pass now. I didn't fix any code but did the following three steps:

  1. Run git pull origin to update all recent changes and the changes in the master branch from merging master into dev because I have recently updated the name of xDTD database to ExplainableDTD_v1.0_KG2.8.4.db.
  2. Please make sure you have ExplainableDTD_v1.0_KG2.8.4.db locally. Otherwise, you need to manually run python ARAX_database_manager.py to update your local database (this is also the solution to fix issue 2257.
  3. Go to /RTX/code/ARAX/ARAXQuery/Expand directory and run python kp_info_cacher.py (this is also the solution to fix issue 2252)

Note that step 2 and 3 can't be done automatically. So we may need to pay attention to them because they might result in some test failures.

chunyuma commented 5 months ago

Now, in dev branch, all tests have passed in my side locally.

saramsey commented 5 months ago

Hi @chunyuma this is super helpful. I'm thinking that instructions (2) and (3) would be good additions to the Dev Info wiki page, right? Since they are relevant to setting up a local dev area in order to be able to successfully run tests (or troubleshooting when those tests won't all run):

https://github.com/RTXteam/RTX/wiki/Dev-info

chunyuma commented 5 months ago

@saramsey, I think David or someone has added those two instructions into the wiki page. I close this issue as it have been resolved.