biothings / mychem.info

MyChem.info: A BioThings API for chemical/drug annotations
http://mychem.info
Apache License 2.0
15 stars 12 forks source link

Add CURIE ID query support #173

Closed ctrl-schaff closed 2 months ago

ctrl-schaff commented 4 months ago
(biothings) jschaff@tsri-ubuntu:~/workspace/biothings/mychem.info/src/tests$ python3 -m pytest . -v
============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.10.12, pytest-8.0.2, pluggy-1.4.0 -- /home/jschaff/workspace/biothings/bin/python3
cachedir: .pytest_cache
rootdir: /home/jschaff/workspace/biothings/mychem.info/src/tests
plugins: mock-3.12.0
collected 45 items                                                                                                                                                                                               

test_data.py::TestMyChemCurieIdParsing::test_001_curie_id_annotation_endpoint_GET FAILED                                                                                                                   [  2%]
test_data.py::TestMyChemCurieIdParsing::test_002_curie_id_annotation_endpoint_POST FAILED                                                                                                                  [  4%]
test_local.py::TestMyChemWebAppConfigAnnotationIdRegex::test_011_chembl PASSED                                                                                                                             [  6%]
test_local.py::TestMyChemWebAppConfigAnnotationIdRegex::test_012_chebi PASSED                                                                                                                              [  8%]
test_local.py::TestMyChemWebAppConfigAnnotationIdRegex::test_013_chebi_secondary PASSED                                                                                                                    [ 11%]
test_local.py::TestMyChemWebAppConfigAnnotationIdRegex::test_014_unii PASSED                                                                                                                               [ 13%]
test_local.py::TestMyChemWebAppConfigAnnotationIdRegex::test_015_pubchem PASSED                                                                                                                            [ 15%]
test_local.py::TestMyChemWebAppConfigAnnotationIdRegex::test_016_pubchem_noprefix PASSED                                                                                                                   [ 17%]
test_local.py::TestMyChemWebAppConfigAnnotationIdRegex::test_021_chembl_ci PASSED                                                                                                                          [ 20%]
test_local.py::TestMyChemWebAppConfigAnnotationIdRegex::test_022_chebi_ci PASSED                                                                                                                           [ 22%]
test_local.py::TestMyChemWebAppConfigAnnotationIdRegex::test_023_cid_ci PASSED                                                                                                                             [ 24%]
test_local.py::TestMyChemWebAppConfigAnnotationRegexMockData::test_001_drugbank_db_in_default_scope PASSED                                                                                                 [ 26%]
test_remote.py::TestMychemDataIntegrity::test_010 PASSED                                                                                                                                                   [ 28%]
test_remote.py::TestMychemDataIntegrity::test_011_drugbank_name SKIPPED (Drugbank has been removed)                                                                                                        [ 31%]
test_remote.py::TestMychemDataIntegrity::test_012_chebi_name PASSED                                                                                                                                        [ 33%]
test_remote.py::TestMychemDataIntegrity::test_031 PASSED                                                                                                                                                   [ 35%]
test_remote.py::TestMychemDataIntegrity::test_032 PASSED                                                                                                                                                   [ 37%]
test_remote.py::TestMychemDataIntegrity::test_033 PASSED                                                                                                                                                   [ 40%]
test_remote.py::TestMychemDataIntegrity::test_034 PASSED                                                                                                                                                   [ 42%]
test_remote.py::TestMychemDataIntegrity::test_035 PASSED                                                                                                                                                   [ 44%]
test_remote.py::TestMychemDataIntegrity::test_040 PASSED                                                                                                                                                   [ 46%]
test_remote.py::TestMychemDataIntegrity::test_050 PASSED                                                                                                                                                   [ 48%]
test_remote.py::TestMychemDataIntegrity::test_100 PASSED                                                                                                                                                   [ 51%]
test_remote.py::TestMychemDataIntegrity::test_110 PASSED                                                                                                                                                   [ 53%]
test_remote.py::TestMychemDataIntegrity::test_120 PASSED                                                                                                                                                   [ 55%]
test_remote.py::TestMychemDataIntegrity::test_121 PASSED                                                                                                                                                   [ 57%]
test_remote.py::TestMychemDataIntegrity::test_122 PASSED                                                                                                                                                   [ 60%]
test_remote.py::TestMychemDataIntegrity::test_300 PASSED                                                                                                                                                   [ 62%]
test_remote.py::TestMychemDataIntegrity::test_310 PASSED                                                                                                                                                   [ 64%]
test_remote.py::TestMychemWebFeatures::test_fields PASSED                                                                                                                                                  [ 66%]
test_remote.py::TestMychemWebFeatures::test_msgpack_1 PASSED                                                                                                                                               [ 68%]
test_remote.py::TestMychemWebFeatures::test_msgpack_3 PASSED                                                                                                                                               [ 71%]
test_remote.py::TestMychemWebFeatures::test_metadata PASSED                                                                                                                                                [ 73%]
test_remote.py::TestMychemSpecialInput::test_fields PASSED                                                                                                                                                 [ 75%]
test_remote.py::TestMychemSpecialInput::test_msgpack_1 PASSED                                                                                                                                              [ 77%]
test_remote.py::TestMychemSpecialInput::test_msgpack_3 PASSED                                                                                                                                              [ 80%]
test_remote.py::TestMychemSpecialInput::test_metadata PASSED                                                                                                                                               [ 82%]
test_remote.py::TestMychemSpecialInput::test_01 PASSED                                                                                                                                                     [ 84%]
test_remote.py::TestMychemSpecialInput::test_02 PASSED                                                                                                                                                     [ 86%]
test_remote.py::TestMychemSpecialInput::test_10 PASSED                                                                                                                                                     [ 88%]
test_remote.py::TestMychemSpecialInput::test_11 PASSED                                                                                                                                                     [ 91%]
test_remote.py::TestMychemSpecialInput::test_12 PASSED                                                                                                                                                     [ 93%]
test_remote.py::TestMychemSpecialInput::test_20_unicode PASSED                                                                                                                                             [ 95%]
test_remote.py::TestMychemSpecialInput::test_21_unicode PASSED                                                                                                                                             [ 97%]
test_remote.py::TestMychemSpecialInput::test_22_unicode PASSED                                                                                                                                             [100%]

==================================================================================================== FAILURES ====================================================================================================
_______________________________________________________________________ TestMyChemCurieIdParsing.test_001_curie_id_annotation_endpoint_GET _______________________________________________________________________
[XPASS(strict)] CURIE ID SUPPORT NOT CURRENTLY ENABLED ON MYCHEM.INFO HOST
--------------------------------------------------------------------------------------------- Captured stderr setup ----------------------------------------------------------------------------------------------

        Test URL: http://localhost:8000/v1
        BioThings SDK Version: 0.12.3
        BioThings SDK path: /home/jschaff/workspace/biothings/lib/python3.10/site-packages/biothings/__init__.py
----------------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------------------
INFO     test_data:test_data.py:92 Query group ('UCMIRNVEIXFBKS-UHFFFAOYSA-N', 'CHEMBL297569', 'CHEMBL.COMPOUND:CHEMBL297569', 'chembl.compound:CHEMBL297569', 'cHEmbl.ComPOUND:CHEMBL297569', 'chembl.molecule_chembl_id:CHEMBL297569') succeeded
INFO     test_data:test_data.py:92 Query group ('AKUPVPKIFATOBM-UHFFFAOYSA-N', '120933777', 120933777, 'PUBCHEM.COMPOUND:120933777', 'pubchem.compound:120933777', 'PuBcHEm.COMPound:120933777', 'pubchem.cid:120933777') succeeded
INFO     test_data:test_data.py:92 Query group ('UCMIRNVEIXFBKS-UHFFFAOYSA-N', 'CHEBI:CHEBI:57966', 'chebi:CHEBI:57966', 'CheBi:CHEBI:57966', 'chebi.id:CHEBI:57966') succeeded
INFO     test_data:test_data.py:92 Query group ('UCMIRNVEIXFBKS-UHFFFAOYSA-N', '11P2JDE17B', 'UNII:11P2JDE17B', 'unii:11P2JDE17B', 'uNIi:11P2JDE17B', 'unii.unii:11P2JDE17B') succeeded
INFO     test_data:test_data.py:92 Query group ('UCMIRNVEIXFBKS-UHFFFAOYSA-N', 'dB03107', 'DRUGBANK:dB03107', 'drugbank:dB03107', 'DrugBaNK:dB03107', 'drugbank.id:dB03107') succeeded
______________________________________________________________________ TestMyChemCurieIdParsing.test_002_curie_id_annotation_endpoint_POST _______________________________________________________________________
[XPASS(strict)] CURIE ID SUPPORT NOT CURRENTLY ENABLED ON MYCHEM.INFO HOST
----------------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------------------
INFO     test_data:test_data.py:184 Query group ('UCMIRNVEIXFBKS-UHFFFAOYSA-N', 'CHEMBL297569', 'CHEMBL.COMPOUND:CHEMBL297569', 'chembl.compound:CHEMBL297569', 'cHEmbl.ComPOUND:CHEMBL297569', 'chembl.molecule_chembl_id:CHEMBL297569') succeeded
INFO     test_data:test_data.py:184 Query group ('AKUPVPKIFATOBM-UHFFFAOYSA-N', '120933777', 120933777, 'PUBCHEM.COMPOUND:120933777', 'pubchem.compound:120933777', 'PuBcHEm.COMPound:120933777', 'pubchem.cid:120933777') succeeded
INFO     test_data:test_data.py:184 Query group ('UCMIRNVEIXFBKS-UHFFFAOYSA-N', 'CHEBI:CHEBI:57966', 'chebi:CHEBI:57966', 'CheBi:CHEBI:57966', 'chebi.id:CHEBI:57966') succeeded
INFO     test_data:test_data.py:184 Query group ('UCMIRNVEIXFBKS-UHFFFAOYSA-N', '11P2JDE17B', 'UNII:11P2JDE17B', 'unii:11P2JDE17B', 'uNIi:11P2JDE17B', 'unii.unii:11P2JDE17B') succeeded
INFO     test_data:test_data.py:184 Query group ('UCMIRNVEIXFBKS-UHFFFAOYSA-N', 'dB03107', 'DRUGBANK:dB03107', 'drugbank:dB03107', 'DrugBaNK:dB03107', 'drugbank.id:dB03107') succeeded
================================================================================================ warnings summary ================================================================================================
test_local.py: 10 warnings
  /home/jschaff/workspace/biothings/lib/python3.10/site-packages/tornado/testing.py:199: DeprecationWarning: get_new_ioloop is deprecated
    warnings.warn("get_new_ioloop is deprecated", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================================ short test summary info =============================================================================================
FAILED test_data.py::TestMyChemCurieIdParsing::test_001_curie_id_annotation_endpoint_GET
FAILED test_data.py::TestMyChemCurieIdParsing::test_002_curie_id_annotation_endpoint_POST
============================================================================= 2 failed, 42 passed, 1 skipped, 10 warnings in 18.44s ==============================================================================