JonnyTran/OpenOmics

Test Suite Errors

sdhutchins opened this issue · 1 comments

  • openOmics version: 0.8.8
  • Python version: 3.9.7
  • Operating System: MacOSX

Description

Hey, all! I'm a fan of this package and hope to use it within my work. I saw the tests were failing so I took a stab at trying to get that working. I was able to fix some flake8 stuff in #166 which at least got to the testing. From there, I found that the imports of the modules was causing testing to not even run. I've submitted a separate PR (#167) for that.

Below are just some of the errors from the tests. I'm guessing some of that is just due to some changes in the packages API, but since I'm not extremely familiar with everything, I figured I'd just share it here it to help.

If it's preferable to leave that PR open to debug, please let me know - or I can close it.

What I Did

============================================================================= short test summary info =============================================================================
FAILED tests/test_annotations.py::test_annotate_GeneOntology - KeyError: 'gene_name'
ERROR tests/test_annotations.py::test_import_rnacentral_db - Exception: Unable to download file at ftp://ftp.ebi.ac.uk/pub/databases/RNAcentral/current_release/go_annotations/r...
ERROR tests/test_annotations.py::test_annotate_rnacentral - Exception: Unable to download file at ftp://ftp.ebi.ac.uk/pub/databases/RNAcentral/current_release/go_annotations/rn...
ERROR tests/test_annotations.py::test_import_MessengerRNA_Dask - TypeError: initialize_annotations() got an unexpected keyword argument 'gene_list'
ERROR tests/test_disease.py::test_import_HMDD - Exception: Unable to download file at http://www.cuilab.cn/static/hmdd3/data/alldata.txt. Please try manually downloading the fi...
ERROR tests/test_disease.py::test_annotate_HMDD - Exception: Unable to download file at http://www.cuilab.cn/static/hmdd3/data/alldata.txt. Please try manually downloading the ...
ERROR tests/test_disease.py::test_LncRNADisease - Exception: Unable to download file at http://www.cuilab.cn/files/images/ldd/data_v2017.txt. Please try manually downloading th...
ERROR tests/test_disease.py::test_annotate_LncRNADisease - Exception: Unable to download file at http://www.cuilab.cn/files/images/ldd/data_v2017.txt. Please try manually downl...
ERROR tests/test_disease.py::test_import_MalaCards - Exception: Unable to download file at http://zdzlab.einstein.yu.edu/1/hedd/download.action.php?filename=DataDownload/MalaCa...
ERROR tests/test_disease.py::test_import_MessengerRNA_Dask - TypeError: initialize_annotations() got an unexpected keyword argument 'gene_list'
ERROR tests/test_interaction.py::test_import_LncRNA2Target - Exception: Unable to download file at http://123.59.132.21/lncrna2target/data/lncrna_target.rar. Please try manuall...
ERROR tests/test_interaction.py::test_import_STRING - networkx.exception.NetworkXError: Invalid edge_attr argument: No columns found with name: []
ERROR tests/test_interaction.py::test_annotate_STRING - networkx.exception.NetworkXError: Invalid edge_attr argument: No columns found with name: []
ERROR tests/test_interaction.py::test_get_interactions_lnc2target - Exception: Unable to download file at http://123.59.132.21/lncrna2target/data/lncrna_target.rar. Please try ...
ERROR tests/test_interaction.py::test_import_MessengerRNA_Dask - TypeError: initialize_annotations() got an unexpected keyword argument 'gene_list'
ERROR tests/test_multiomics.py::test_import_MessengerRNA_Dask - TypeError: initialize_annotations() got an unexpected keyword argument 'gene_list'
ERROR tests/test_sequences.py::test_import_MessengerRNA_Dask - TypeError: initialize_annotations() got an unexpected keyword argument 'gene_list'
ERROR tests/test_sequences.py::test_import_mirbase_db - Exception: Unable to download file at ftp://mirbase.org/pub/mirbase/CURRENT/aliases.txt.gz. Please try manually download...
ERROR tests/test_sequences.py::test_import_GENCODE - Exception: Unable to download file at ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_32/gencode.v32.long_n...
ERROR tests/test_sequences.py::test_import_dask_GENCODE - TypeError: __init__() got an unexpected keyword argument 'npartitions'
ERROR tests/test_sequences.py::test_annotate_GENCODE - Exception: Unable to download file at ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_32/gencode.v32.long...
ERROR tests/test_sequences.py::test_annotate_dask_GENCODE - TypeError: __init__() got an unexpected keyword argument 'npartitions'
ERROR tests/test_sequences.py::test_annotate_sequence_GENCODE - Exception: Unable to download file at ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_32/gencode...
========================================================= 1 failed, 15 passed, 5 warnings, 22 errors in 757.03s (0:12:37) =========================================================

Hi @sdhutchins, thanks for the #166 PR and for pointing #167 out. I will comment more on #167 to fix this issue asap. Glad to know you find uses from this package!

There are quite a few problems that I haven't got to yet, particularly because I've been refactoring some of the modules to add new and simplifying existing functionalities. These errors you see are the result of hurried development and incomplete/outdated tests (my bad!):

  • The pytest codes haven't yet been updated to work with a few of these refactoring around the Database classes and the MultiOmics classes. The import errors you see are also the result of this. If you'd like to fix it, please feel free to make PR's to the __init__.py files at openomics/__init__.py and database/__init__.py.
  • The GH Actions tests currently are easy to fail and too time-consuming because it would download the whole database files instead of testing only on a subset of the data (imagine the unnecessary load on the public servers). A future work is to generate test data with only a few rows for each of the database files.
  • Currently I've been committing straight to master, once most of the tests are in the useable state, I should move PR's to the develop branch.