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

Add CURIE ID query support (mygene support) #33

Merged
merged 14 commits into from
May 29, 2024

Conversation

ctrl-schaff
Copy link
Contributor

No description provided.

Also separate the settings into a separate file for isolating the
configuration from client construction methods
Johnathan Schaff added 9 commits February 5, 2024 16:15
Specifically targets _getannotation and _getannotations methods at the
moment and only for the mygene instance
Not all of the different sites will work with that. Ran into issues
with that default pattern with myvariant. Instead we should view this
feature as specifically targetting support for the biolink prefixes
and nothing else
Pivot to adding testing and verification that the API / server side
implementation supports the CURIE ID
@ctrl-schaff
Copy link
Contributor Author

Settings Configuration Diff:

+-- 65 lines: """---------------------------------------------------------------------------------
   66 }                                                                                                  |   66 }
   67 # project specific kwargs                                                                          |   67 # project specific kwargs
   68 MYGENE_KWARGS = copy(COMMON_KWARGS)                                                                |   68 MYGENE_KWARGS = copy(COMMON_KWARGS)
   69                                                                                                    |   69 
   70 MYGENE_KWARGS.update(                                                                              |   70 MYGENE_KWARGS.update(
   71     {                                                                                              |   71     {
   72         "_default_url": "https://mygene.info/v3",                                                  |   72         # "_default_url": "https://mygene.info/v3",                                               
      ---------------------------------------------------------------------------------------------------|   73         "_default_url": "http://localhost:8000/v3",                                               
   73         "_annotation_endpoint": "/gene/",                                                          |   74         "_annotation_endpoint": "/gene/",
   74         "_optionally_plural_object_type": "gene(s)",                                               |   75         "_optionally_plural_object_type": "gene(s)",
   75         "_default_cache_file": "mygene_cache",                                                     |   76         "_default_cache_file": "mygene_cache",
   76         "_entity": "gene",                                                                         |   77         "_entity": "gene",
   77         "_docstring_obj": GENE_DOCSTRING,                                                          |   78         "_docstring_obj": GENE_DOCSTRING,
   78     }                                                                                              |   79     }
+  79 +--128 lines: )------------------------------------------------------------------------------------|+  80 +--128 lines: )-----------------------------------------------------------------------------------
~                                                                                                        |~          

New Tests:

(biothings) jschaff@tsri-debian:~/workspace/biothings/biothings_client.py$ python3 -m pytest -v tests/gene.py -k "curie"
============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.11.2, pytest-7.4.4, pluggy-1.3.0 -- /home/jschaff/workspace/biothings/bin/python3
cachedir: .pytest_cache
rootdir: /home/jschaff/workspace/biothings/biothings_client.py
plugins: mock-3.12.0
collected 22 items / 20 deselected / 2 selected                                                                                                                                                                  

tests/gene.py::TestGeneClient::test_curie_id_query PASSED                                                                                                                                                  [ 50%]
tests/gene.py::TestGeneClient::test_multiple_curie_id_query PASSED                                                                                                                                         [100%]

======================================================================================= 2 passed, 20 deselected in 10.90s ========================================================================================

Gene Tests:

(biothings) jschaff@tsri-debian:~/workspace/biothings/biothings_client.py$ python3 -m pytest -v tests/gene.py 
============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.11.2, pytest-7.4.4, pluggy-1.3.0 -- /home/jschaff/workspace/biothings/bin/python3
cachedir: .pytest_cache
rootdir: /home/jschaff/workspace/biothings/biothings_client.py
plugins: mock-3.12.0
collected 22 items                                                                                                                                                                                               

tests/gene.py::TestGeneClient::test_caching SKIPPED (requests_cache not available)                                                                                                                         [  4%]
tests/gene.py::TestGeneClient::test_curie_id_query PASSED                                                                                                                                                  [  9%]
tests/gene.py::TestGeneClient::test_get_fields PASSED                                                                                                                                                      [ 13%]
tests/gene.py::TestGeneClient::test_getgene PASSED                                                                                                                                                         [ 18%]
tests/gene.py::TestGeneClient::test_getgene_with_fields PASSED                                                                                                                                             [ 22%]
tests/gene.py::TestGeneClient::test_getgene_with_fields_as_list PASSED                                                                                                                                     [ 27%]
tests/gene.py::TestGeneClient::test_getgenes PASSED                                                                                                                                                        [ 31%]
tests/gene.py::TestGeneClient::test_http PASSED                                                                                                                                                            [ 36%]
tests/gene.py::TestGeneClient::test_metadata PASSED                                                                                                                                                        [ 40%]
tests/gene.py::TestGeneClient::test_multiple_curie_id_query PASSED                                                                                                                                         [ 45%]
tests/gene.py::TestGeneClient::test_query PASSED                                                                                                                                                           [ 50%]
tests/gene.py::TestGeneClient::test_query_fetch_all PASSED                                                                                                                                                 [ 54%]
tests/gene.py::TestGeneClient::test_query_reporter PASSED                                                                                                                                                  [ 59%]
tests/gene.py::TestGeneClient::test_query_symbol PASSED                                                                                                                                                    [ 63%]
tests/gene.py::TestGeneClient::test_query_with_fields_as_list PASSED                                                                                                                                       [ 68%]
tests/gene.py::TestGeneClient::test_querymany PASSED                                                                                                                                                       [ 72%]
tests/gene.py::TestGeneClient::test_querymany_dataframe PASSED                                                                                                                                             [ 77%]
tests/gene.py::TestGeneClient::test_querymany_fields PASSED                                                                                                                                                [ 81%]
tests/gene.py::TestGeneClient::test_querymany_notfound PASSED                                                                                                                                              [ 86%]
tests/gene.py::TestGeneClient::test_querymany_species PASSED                                                                                                                                               [ 90%]
tests/gene.py::TestGeneClient::test_querymany_step PASSED                                                                                                                                                  [ 95%]
tests/gene.py::TestGeneClient::test_querymany_with_scopes PASSED                                                                                                                                           [100%]

================================================================================================ warnings summary ================================================================================================
tests/gene.py::TestGeneClient::test_querymany_fields
tests/gene.py::TestGeneClient::test_querymany_fields
tests/gene.py::TestGeneClient::test_querymany_notfound
tests/gene.py::TestGeneClient::test_querymany_species
tests/gene.py::TestGeneClient::test_querymany_species
  /home/jschaff/workspace/biothings/biothings_client.py/biothings_client/mixins/gene.py:8: DeprecationWarning: Deprecated! Currently an alias of "querymany" method. Use "querymany" method directly.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================================================================== 21 passed, 1 skipped, 5 warnings in 50.90s ===================================================================================

Tox Suite (Master Branch):

(biothings) jschaff@tsri-debian:~/workspace/biothings/biothings_client.py$ tox run
py27: skipped because could not find python interpreter with spec(s): py27
py27: SKIP ⚠ in 0.01 seconds
py34: skipped because could not find python interpreter with spec(s): py34
py34: SKIP ⚠ in 0 seconds
py35: skipped because could not find python interpreter with spec(s): py35
py35: SKIP ⚠ in 0 seconds
py36: skipped because could not find python interpreter with spec(s): py36
py36: SKIP ⚠ in 0 seconds
py36-pandas: skipped because could not find python interpreter with spec(s): py36
py36-pandas: SKIP ⚠ in 0 seconds
py36-caching37: skipped because could not find python interpreter with spec(s): py36
py36-caching37: SKIP ⚠ in 0 seconds
py38: skipped because could not find python interpreter with spec(s): py38
py38: SKIP ⚠ in 0 seconds
py39: skipped because could not find python interpreter with spec(s): py39
py39: SKIP ⚠ in 0 seconds
py310: skipped because could not find python interpreter with spec(s): py310
py310: SKIP ⚠ in 0 seconds
.pkg: _optional_hooks> python /home/jschaff/workspace/biothings/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /home/jschaff/workspace/biothings/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /home/jschaff/workspace/biothings/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py311: install_package> python -I -m pip install --force-reinstall --no-deps /home/jschaff/workspace/biothings/biothings_client.py/.tox/.tmp/package/38/biothings_client-0.3.1.tar.gz
py311: commands[0]> pytest -v /home/jschaff/workspace/biothings/biothings_client.py/tests/chem.py /home/jschaff/workspace/biothings/biothings_client.py/tests/gene.py /home/jschaff/workspace/biothings/biothings_client.py/tests/geneset.py /home/jschaff/workspace/biothings/biothings_client.py/tests/test.py /home/jschaff/workspace/biothings/biothings_client.py/tests/utils.py /home/jschaff/workspace/biothings/biothings_client.py/tests/variant.py
============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.11.2, pytest-8.0.0, pluggy-1.4.0 -- /home/jschaff/workspace/biothings/biothings_client.py/.tox/py311/bin/python
cachedir: .tox/py311/.pytest_cache
rootdir: /home/jschaff/workspace/biothings/biothings_client.py
collected 87 items                                                                                                                                                                                               

tests/chem.py::TestChemClient::test_caching PASSED                                                                                                                                                         [  1%]
tests/chem.py::TestChemClient::test_get_fields PASSED                                                                                                                                                      [  2%]
tests/chem.py::TestChemClient::test_getchem PASSED                                                                                                                                                         [  3%]
tests/chem.py::TestChemClient::test_getchem_with_fields PASSED                                                                                                                                             [  4%]
tests/chem.py::TestChemClient::test_getchems PASSED                                                                                                                                                        [  5%]
tests/chem.py::TestChemClient::test_metadata PASSED                                                                                                                                                        [  6%]
tests/chem.py::TestChemClient::test_query PASSED                                                                                                                                                           [  8%]
tests/chem.py::TestChemClient::test_query_aeolus PASSED                                                                                                                                                    [  9%]
tests/chem.py::TestChemClient::test_query_chebi PASSED                                                                                                                                                     [ 10%]
tests/chem.py::TestChemClient::test_query_chembl PASSED                                                                                                                                                    [ 11%]
tests/chem.py::TestChemClient::test_query_drugbank SKIPPED (Drugbank was removed)                                                                                                                          [ 12%]
tests/chem.py::TestChemClient::test_query_drugcentral PASSED                                                                                                                                               [ 13%]
tests/chem.py::TestChemClient::test_query_fetch_all FAILED                                                                                                                                                 [ 14%]
tests/chem.py::TestChemClient::test_query_ginas PASSED                                                                                                                                                     [ 16%]
tests/chem.py::TestChemClient::test_query_ndc PASSED                                                                                                                                                       [ 17%]
tests/chem.py::TestChemClient::test_query_pharmgkb PASSED                                                                                                                                                  [ 18%]
tests/chem.py::TestChemClient::test_query_pubchem PASSED                                                                                                                                                   [ 19%]
tests/chem.py::TestChemClient::test_query_sider PASSED                                                                                                                                                     [ 20%]
tests/chem.py::TestChemClient::test_query_unii PASSED                                                                                                                                                      [ 21%]
tests/chem.py::TestChemClient::test_querymany PASSED                                                                                                                                                       [ 22%]
tests/chem.py::TestChemClient::test_querymany_dataframe PASSED                                                                                                                                             [ 24%]
tests/chem.py::TestChemClient::test_querymany_fields PASSED                                                                                                                                                [ 25%]
tests/chem.py::TestChemClient::test_querymany_notfound PASSED                                                                                                                                              [ 26%]
tests/chem.py::TestChemClient::test_querymany_step PASSED                                                                                                                                                  [ 27%]
tests/chem.py::TestChemClient::test_querymany_with_scopes PASSED                                                                                                                                           [ 28%]
tests/gene.py::TestGeneClient::test_caching PASSED                                                                                                                                                         [ 29%]
tests/gene.py::TestGeneClient::test_get_fields PASSED                                                                                                                                                      [ 31%]
tests/gene.py::TestGeneClient::test_getgene PASSED                                                                                                                                                         [ 32%]
tests/gene.py::TestGeneClient::test_getgene_with_fields PASSED                                                                                                                                             [ 33%]
tests/gene.py::TestGeneClient::test_getgene_with_fields_as_list PASSED                                                                                                                                     [ 34%]
tests/gene.py::TestGeneClient::test_getgenes PASSED                                                                                                                                                        [ 35%]
tests/gene.py::TestGeneClient::test_http PASSED                                                                                                                                                            [ 36%]
tests/gene.py::TestGeneClient::test_metadata PASSED                                                                                                                                                        [ 37%]
tests/gene.py::TestGeneClient::test_query PASSED                                                                                                                                                           [ 39%]
tests/gene.py::TestGeneClient::test_query_fetch_all PASSED                                                                                                                                                 [ 40%]
tests/gene.py::TestGeneClient::test_query_reporter PASSED                                                                                                                                                  [ 41%]
tests/gene.py::TestGeneClient::test_query_symbol PASSED                                                                                                                                                    [ 42%]
tests/gene.py::TestGeneClient::test_query_with_fields_as_list PASSED                                                                                                                                       [ 43%]
tests/gene.py::TestGeneClient::test_querymany PASSED                                                                                                                                                       [ 44%]
tests/gene.py::TestGeneClient::test_querymany_dataframe PASSED                                                                                                                                             [ 45%]
tests/gene.py::TestGeneClient::test_querymany_fields PASSED                                                                                                                                                [ 47%]
tests/gene.py::TestGeneClient::test_querymany_notfound PASSED                                                                                                                                              [ 48%]
tests/gene.py::TestGeneClient::test_querymany_species PASSED                                                                                                                                               [ 49%]
tests/gene.py::TestGeneClient::test_querymany_step PASSED                                                                                                                                                  [ 50%]
tests/gene.py::TestGeneClient::test_querymany_with_scopes PASSED                                                                                                                                           [ 51%]
tests/geneset.py::TestGenesetClient::test_caching PASSED                                                                                                                                                   [ 52%]
tests/geneset.py::TestGenesetClient::test_getgeneset PASSED                                                                                                                                                [ 54%]
tests/geneset.py::TestGenesetClient::test_getgeneset_with_fields PASSED                                                                                                                                    [ 55%]
tests/geneset.py::TestGenesetClient::test_getgenesets PASSED                                                                                                                                               [ 56%]
tests/geneset.py::TestGenesetClient::test_metadata PASSED                                                                                                                                                  [ 57%]
tests/geneset.py::TestGenesetClient::test_query PASSED                                                                                                                                                     [ 58%]
tests/geneset.py::TestGenesetClient::test_query_by_description PASSED                                                                                                                                      [ 59%]
tests/geneset.py::TestGenesetClient::test_query_by_id PASSED                                                                                                                                               [ 60%]
tests/geneset.py::TestGenesetClient::test_query_by_name PASSED                                                                                                                                             [ 62%]
tests/geneset.py::TestGenesetClient::test_query_by_source_ctd PASSED                                                                                                                                       [ 63%]
tests/geneset.py::TestGenesetClient::test_query_by_source_do PASSED                                                                                                                                        [ 64%]
tests/geneset.py::TestGenesetClient::test_query_by_source_go PASSED                                                                                                                                        [ 65%]
tests/geneset.py::TestGenesetClient::test_query_by_source_kegg SKIPPED (We removed kegg data source for now)                                                                                               [ 66%]
tests/geneset.py::TestGenesetClient::test_query_by_source_msigdb PASSED                                                                                                                                    [ 67%]
tests/geneset.py::TestGenesetClient::test_query_by_source_reactome PASSED                                                                                                                                  [ 68%]
tests/geneset.py::TestGenesetClient::test_query_by_source_smpdb PASSED                                                                                                                                     [ 70%]
tests/geneset.py::TestGenesetClient::test_query_default_fields PASSED                                                                                                                                      [ 71%]
tests/geneset.py::TestGenesetClient::test_query_fetch_all PASSED                                                                                                                                           [ 72%]
tests/geneset.py::TestGenesetClient::test_query_field PASSED                                                                                                                                               [ 73%]
tests/geneset.py::TestGenesetClient::test_query_with_fields_as_list PASSED                                                                                                                                 [ 74%]
tests/geneset.py::TestGenesetClient::test_species_filter_plus_query PASSED                                                                                                                                 [ 75%]
tests/test.py::TestBiothingsClient::test_generate_settings_from_url PASSED                                                                                                                                 [ 77%]
tests/test.py::TestBiothingsClient::test_get_client PASSED                                                                                                                                                 [ 78%]
tests/variant.py::TestVariantClient::test_caching PASSED                                                                                                                                                   [ 79%]
tests/variant.py::TestVariantClient::test_format_hgvs PASSED                                                                                                                                               [ 80%]
tests/variant.py::TestVariantClient::test_get_fields PASSED                                                                                                                                                [ 81%]
tests/variant.py::TestVariantClient::test_getvariant PASSED                                                                                                                                                [ 82%]
tests/variant.py::TestVariantClient::test_getvariant_with_fields PASSED                                                                                                                                    [ 83%]
tests/variant.py::TestVariantClient::test_getvariants PASSED                                                                                                                                               [ 85%]
tests/variant.py::TestVariantClient::test_metadata PASSED                                                                                                                                                  [ 86%]
tests/variant.py::TestVariantClient::test_query PASSED                                                                                                                                                     [ 87%]
tests/variant.py::TestVariantClient::test_query_fetch_all FAILED                                                                                                                                           [ 88%]
tests/variant.py::TestVariantClient::test_query_genomic_range PASSED                                                                                                                                       [ 89%]
tests/variant.py::TestVariantClient::test_query_hgvs PASSED                                                                                                                                                [ 90%]
tests/variant.py::TestVariantClient::test_query_rsid PASSED                                                                                                                                                [ 91%]
tests/variant.py::TestVariantClient::test_query_symbol PASSED                                                                                                                                              [ 93%]
tests/variant.py::TestVariantClient::test_querymany PASSED                                                                                                                                                 [ 94%]
tests/variant.py::TestVariantClient::test_querymany_dataframe PASSED                                                                                                                                       [ 95%]
tests/variant.py::TestVariantClient::test_querymany_fields PASSED                                                                                                                                          [ 96%]
tests/variant.py::TestVariantClient::test_querymany_notfound PASSED                                                                                                                                        [ 97%]
tests/variant.py::TestVariantClient::test_querymany_step PASSED                                                                                                                                            [ 98%]
tests/variant.py::TestVariantClient::test_querymany_with_scopes PASSED                                                                                                                                     [100%]

==================================================================================================== FAILURES ====================================================================================================
______________________________________________________________________________________ TestChemClient.test_query_fetch_all _______________________________________________________________________________________

self = <tests.chem.TestChemClient testMethod=test_query_fetch_all>

    def test_query_fetch_all(self):
        # fetch_all won't work when caching is used.
        self.mc.stop_caching()
        q = "drugcentral.drug_use.contraindication.umls_cui:C0023530"
        qres = self.mc.query(q, size=0)
        total = qres["total"]
    
        qres = self.mc.query(q, fields="drugcentral.drug_use", fetch_all=True)
        self.assertTrue(isinstance(qres, types.GeneratorType))
>       self.assertEqual(total, len(list(qres)))

tests/chem.py:173: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
biothings_client/base.py:499: in _fetch_all
    batch = _batch()
biothings_client/base.py:496: in _batch
    from_cache, ret = self._get(url, params=kwargs, verbose=verbose)
biothings_client/base.py:188: in _get
    res.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""
    
        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason
    
        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )
    
        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )
    
        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: search_phase_execution_exception for url: https://mychem.info/v1/query/?fields=drugcentral.drug_use&fetch_all=True&q=drugcentral.drug_use.contraindication.umls_cui%3AC0023530

.tox/py311/lib/python3.11/site-packages/requests/models.py:1021: HTTPError
_____________________________________________________________________________________ TestVariantClient.test_query_fetch_all _____________________________________________________________________________________

self = <tests.variant.TestVariantClient testMethod=test_query_fetch_all>

    def test_query_fetch_all(self):
        # fetch_all won't work when caching is used.
        self.mv.stop_caching()
        qres = self.mv.query("chr1:69500-70000", fields="chrom")
        total = qres["total"]
    
        qres = self.mv.query("chr1:69500-70000", fields="chrom", fetch_all=True)
        self.assertTrue(isinstance(qres, types.GeneratorType))
>       self.assertEqual(total, len(list(qres)))
E       AssertionError: 1510 != 357

tests/variant.py:143: AssertionError
----------------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------------------
INFO     biothings.client:base.py:501 Fetching 357 variant(s) . . .
ERROR    biothings.client:base.py:506 No more results to return.
================================================================================================ warnings summary ================================================================================================
biothings_client/base.py:24
  /home/jschaff/workspace/biothings/biothings_client.py/biothings_client/base.py:24: DeprecationWarning: 
  Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
  (to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
  but was not found to be installed on your system.
  If this would cause problems for you,
  please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466
          
    from pandas import DataFrame, json_normalize

tests/gene.py::TestGeneClient::test_querymany_fields
tests/gene.py::TestGeneClient::test_querymany_fields
tests/gene.py::TestGeneClient::test_querymany_notfound
tests/gene.py::TestGeneClient::test_querymany_species
tests/gene.py::TestGeneClient::test_querymany_species
  /home/jschaff/workspace/biothings/biothings_client.py/biothings_client/mixins/gene.py:8: DeprecationWarning: Deprecated! Currently an alias of "querymany" method. Use "querymany" method directly.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================================ short test summary info =============================================================================================
FAILED tests/chem.py::TestChemClient::test_query_fetch_all - requests.exceptions.HTTPError: 500 Server Error: search_phase_execution_exception for url: https://mychem.info/v1/query/?fields=drugcentral.drug_use&fetch_all=True&q=drugcentral.drug_use.contraindication.u...
FAILED tests/variant.py::TestVariantClient::test_query_fetch_all - AssertionError: 1510 != 357
======================================================================== 2 failed, 83 passed, 2 skipped, 6 warnings in 142.32s (0:02:22) =========================================================================
py311: exit 1 (142.55 seconds) /home/jschaff/workspace/biothings/biothings_client.py> pytest -v /home/jschaff/workspace/biothings/biothings_client.py/tests/chem.py /home/jschaff/workspace/biothings/biothings_client.py/tests/gene.py /home/jschaff/workspace/biothings/biothings_client.py/tests/geneset.py /home/jschaff/workspace/biothings/biothings_client.py/tests/test.py /home/jschaff/workspace/biothings/biothings_client.py/tests/utils.py /home/jschaff/workspace/biothings/biothings_client.py/tests/variant.py pid=519495
.pkg: _exit> python /home/jschaff/workspace/biothings/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  py27: SKIP (0.01 seconds)
  py34: SKIP (0.00 seconds)
  py35: SKIP (0.00 seconds)
  py36: SKIP (0.00 seconds)
  py36-pandas: SKIP (0.00 seconds)
  py36-caching37: SKIP (0.00 seconds)
  py38: SKIP (0.00 seconds)
  py39: SKIP (0.00 seconds)
  py310: SKIP (0.00 seconds)
  py311: FAIL code 1 (144.95=setup[2.40]+cmd[142.55] seconds)
  evaluation failed :( (145.00 seconds)

Tox Suite (feature branch):

(biothings) jschaff@tsri-debian:~/workspace/biothings/biothings_client.py$ git stash pop
On branch add-curie-id-query-support
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   biothings_client/settings.py

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        base
        batch
        docs/gene_client.md

no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (e7f958d01c7d99908674ce97283a0c3d621cf2ca)
(biothings) jschaff@tsri-debian:~/workspace/biothings/biothings_client.py$ tox run
py27: skipped because could not find python interpreter with spec(s): py27
py27: SKIP ⚠ in 0.01 seconds
py34: skipped because could not find python interpreter with spec(s): py34
py34: SKIP ⚠ in 0 seconds
py35: skipped because could not find python interpreter with spec(s): py35
py35: SKIP ⚠ in 0 seconds
py36: skipped because could not find python interpreter with spec(s): py36
py36: SKIP ⚠ in 0 seconds
py36-pandas: skipped because could not find python interpreter with spec(s): py36
py36-pandas: SKIP ⚠ in 0 seconds
py36-caching37: skipped because could not find python interpreter with spec(s): py36
py36-caching37: SKIP ⚠ in 0 seconds
py38: skipped because could not find python interpreter with spec(s): py38
py38: SKIP ⚠ in 0 seconds
py39: skipped because could not find python interpreter with spec(s): py39
py39: SKIP ⚠ in 0 seconds
py310: skipped because could not find python interpreter with spec(s): py310
py310: SKIP ⚠ in 0 seconds
.pkg: _optional_hooks> python /home/jschaff/workspace/biothings/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /home/jschaff/workspace/biothings/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /home/jschaff/workspace/biothings/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py311: install_package> python -I -m pip install --force-reinstall --no-deps /home/jschaff/workspace/biothings/biothings_client.py/.tox/.tmp/package/40/biothings_client-0.3.1.tar.gz
py311: commands[0]> pytest -v /home/jschaff/workspace/biothings/biothings_client.py/tests/chem.py /home/jschaff/workspace/biothings/biothings_client.py/tests/gene.py /home/jschaff/workspace/biothings/biothings_client.py/tests/geneset.py /home/jschaff/workspace/biothings/biothings_client.py/tests/test.py /home/jschaff/workspace/biothings/biothings_client.py/tests/utils.py /home/jschaff/workspace/biothings/biothings_client.py/tests/variant.py
============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.11.2, pytest-8.0.0, pluggy-1.4.0 -- /home/jschaff/workspace/biothings/biothings_client.py/.tox/py311/bin/python
cachedir: .tox/py311/.pytest_cache
rootdir: /home/jschaff/workspace/biothings/biothings_client.py
collected 89 items                                                                                                                                                                                               

tests/chem.py::TestChemClient::test_caching PASSED                                                                                                                                                         [  1%]
tests/chem.py::TestChemClient::test_get_fields PASSED                                                                                                                                                      [  2%]
tests/chem.py::TestChemClient::test_getchem PASSED                                                                                                                                                         [  3%]
tests/chem.py::TestChemClient::test_getchem_with_fields PASSED                                                                                                                                             [  4%]
tests/chem.py::TestChemClient::test_getchems PASSED                                                                                                                                                        [  5%]
tests/chem.py::TestChemClient::test_metadata PASSED                                                                                                                                                        [  6%]
tests/chem.py::TestChemClient::test_query PASSED                                                                                                                                                           [  7%]
tests/chem.py::TestChemClient::test_query_aeolus PASSED                                                                                                                                                    [  8%]
tests/chem.py::TestChemClient::test_query_chebi PASSED                                                                                                                                                     [ 10%]
tests/chem.py::TestChemClient::test_query_chembl PASSED                                                                                                                                                    [ 11%]
tests/chem.py::TestChemClient::test_query_drugbank SKIPPED (Drugbank was removed)                                                                                                                          [ 12%]
tests/chem.py::TestChemClient::test_query_drugcentral XFAIL                                                                                                                                                [ 13%]
tests/chem.py::TestChemClient::test_query_fetch_all FAILED                                                                                                                                                 [ 14%]
tests/chem.py::TestChemClient::test_query_ginas PASSED                                                                                                                                                     [ 15%]
tests/chem.py::TestChemClient::test_query_ndc PASSED                                                                                                                                                       [ 16%]
tests/chem.py::TestChemClient::test_query_pharmgkb PASSED                                                                                                                                                  [ 17%]
tests/chem.py::TestChemClient::test_query_pubchem PASSED                                                                                                                                                   [ 19%]
tests/chem.py::TestChemClient::test_query_sider XFAIL                                                                                                                                                      [ 20%]
tests/chem.py::TestChemClient::test_query_unii PASSED                                                                                                                                                      [ 21%]
tests/chem.py::TestChemClient::test_querymany PASSED                                                                                                                                                       [ 22%]
tests/chem.py::TestChemClient::test_querymany_dataframe PASSED                                                                                                                                             [ 23%]
tests/chem.py::TestChemClient::test_querymany_fields PASSED                                                                                                                                                [ 24%]
tests/chem.py::TestChemClient::test_querymany_notfound PASSED                                                                                                                                              [ 25%]
tests/chem.py::TestChemClient::test_querymany_step PASSED                                                                                                                                                  [ 26%]
tests/chem.py::TestChemClient::test_querymany_with_scopes PASSED                                                                                                                                           [ 28%]
tests/gene.py::TestGeneClient::test_caching PASSED                                                                                                                                                         [ 29%]
tests/gene.py::TestGeneClient::test_curie_id_query PASSED                                                                                                                                                  [ 30%]
tests/gene.py::TestGeneClient::test_get_fields PASSED                                                                                                                                                      [ 31%]
tests/gene.py::TestGeneClient::test_getgene PASSED                                                                                                                                                         [ 32%]
tests/gene.py::TestGeneClient::test_getgene_with_fields PASSED                                                                                                                                             [ 33%]
tests/gene.py::TestGeneClient::test_getgene_with_fields_as_list PASSED                                                                                                                                     [ 34%]
tests/gene.py::TestGeneClient::test_getgenes PASSED                                                                                                                                                        [ 35%]
tests/gene.py::TestGeneClient::test_http PASSED                                                                                                                                                            [ 37%]
tests/gene.py::TestGeneClient::test_metadata PASSED                                                                                                                                                        [ 38%]
tests/gene.py::TestGeneClient::test_multiple_curie_id_query PASSED                                                                                                                                         [ 39%]
tests/gene.py::TestGeneClient::test_query PASSED                                                                                                                                                           [ 40%]
tests/gene.py::TestGeneClient::test_query_fetch_all PASSED                                                                                                                                                 [ 41%]
tests/gene.py::TestGeneClient::test_query_reporter PASSED                                                                                                                                                  [ 42%]
tests/gene.py::TestGeneClient::test_query_symbol PASSED                                                                                                                                                    [ 43%]
tests/gene.py::TestGeneClient::test_query_with_fields_as_list PASSED                                                                                                                                       [ 44%]
tests/gene.py::TestGeneClient::test_querymany PASSED                                                                                                                                                       [ 46%]
tests/gene.py::TestGeneClient::test_querymany_dataframe PASSED                                                                                                                                             [ 47%]
tests/gene.py::TestGeneClient::test_querymany_fields PASSED                                                                                                                                                [ 48%]
tests/gene.py::TestGeneClient::test_querymany_notfound PASSED                                                                                                                                              [ 49%]
tests/gene.py::TestGeneClient::test_querymany_species PASSED                                                                                                                                               [ 50%]
tests/gene.py::TestGeneClient::test_querymany_step PASSED                                                                                                                                                  [ 51%]
tests/gene.py::TestGeneClient::test_querymany_with_scopes PASSED                                                                                                                                           [ 52%]
tests/geneset.py::TestGenesetClient::test_caching PASSED                                                                                                                                                   [ 53%]
tests/geneset.py::TestGenesetClient::test_getgeneset PASSED                                                                                                                                                [ 55%]
tests/geneset.py::TestGenesetClient::test_getgeneset_with_fields PASSED                                                                                                                                    [ 56%]
tests/geneset.py::TestGenesetClient::test_getgenesets PASSED                                                                                                                                               [ 57%]
tests/geneset.py::TestGenesetClient::test_metadata PASSED                                                                                                                                                  [ 58%]
tests/geneset.py::TestGenesetClient::test_query PASSED                                                                                                                                                     [ 59%]
tests/geneset.py::TestGenesetClient::test_query_by_description PASSED                                                                                                                                      [ 60%]
tests/geneset.py::TestGenesetClient::test_query_by_id PASSED                                                                                                                                               [ 61%]
tests/geneset.py::TestGenesetClient::test_query_by_name PASSED                                                                                                                                             [ 62%]
tests/geneset.py::TestGenesetClient::test_query_by_source_ctd PASSED                                                                                                                                       [ 64%]
tests/geneset.py::TestGenesetClient::test_query_by_source_do PASSED                                                                                                                                        [ 65%]
tests/geneset.py::TestGenesetClient::test_query_by_source_go PASSED                                                                                                                                        [ 66%]
tests/geneset.py::TestGenesetClient::test_query_by_source_kegg SKIPPED (We removed kegg data source for now)                                                                                               [ 67%]
tests/geneset.py::TestGenesetClient::test_query_by_source_msigdb PASSED                                                                                                                                    [ 68%]
tests/geneset.py::TestGenesetClient::test_query_by_source_reactome PASSED                                                                                                                                  [ 69%]
tests/geneset.py::TestGenesetClient::test_query_by_source_smpdb PASSED                                                                                                                                     [ 70%]
tests/geneset.py::TestGenesetClient::test_query_default_fields PASSED                                                                                                                                      [ 71%]
tests/geneset.py::TestGenesetClient::test_query_fetch_all PASSED                                                                                                                                           [ 73%]
tests/geneset.py::TestGenesetClient::test_query_field PASSED                                                                                                                                               [ 74%]
tests/geneset.py::TestGenesetClient::test_query_with_fields_as_list PASSED                                                                                                                                 [ 75%]
tests/geneset.py::TestGenesetClient::test_species_filter_plus_query PASSED                                                                                                                                 [ 76%]
tests/test.py::TestBiothingsClient::test_generate_settings_from_url PASSED                                                                                                                                 [ 77%]
tests/test.py::TestBiothingsClient::test_get_client PASSED                                                                                                                                                 [ 78%]
tests/variant.py::TestVariantClient::test_caching PASSED                                                                                                                                                   [ 79%]
tests/variant.py::TestVariantClient::test_format_hgvs PASSED                                                                                                                                               [ 80%]
tests/variant.py::TestVariantClient::test_get_fields PASSED                                                                                                                                                [ 82%]
tests/variant.py::TestVariantClient::test_getvariant PASSED                                                                                                                                                [ 83%]
tests/variant.py::TestVariantClient::test_getvariant_with_fields PASSED                                                                                                                                    [ 84%]
tests/variant.py::TestVariantClient::test_getvariants FAILED                                                                                                                                               [ 85%]
tests/variant.py::TestVariantClient::test_metadata PASSED                                                                                                                                                  [ 86%]
tests/variant.py::TestVariantClient::test_query PASSED                                                                                                                                                     [ 87%]
tests/variant.py::TestVariantClient::test_query_fetch_all FAILED                                                                                                                                           [ 88%]
tests/variant.py::TestVariantClient::test_query_genomic_range PASSED                                                                                                                                       [ 89%]
tests/variant.py::TestVariantClient::test_query_hgvs PASSED                                                                                                                                                [ 91%]
tests/variant.py::TestVariantClient::test_query_rsid PASSED                                                                                                                                                [ 92%]
tests/variant.py::TestVariantClient::test_query_symbol PASSED                                                                                                                                              [ 93%]
tests/variant.py::TestVariantClient::test_querymany PASSED                                                                                                                                                 [ 94%]
tests/variant.py::TestVariantClient::test_querymany_dataframe PASSED                                                                                                                                       [ 95%]
tests/variant.py::TestVariantClient::test_querymany_fields PASSED                                                                                                                                          [ 96%]
tests/variant.py::TestVariantClient::test_querymany_notfound PASSED                                                                                                                                        [ 97%]
tests/variant.py::TestVariantClient::test_querymany_step PASSED                                                                                                                                            [ 98%]
tests/variant.py::TestVariantClient::test_querymany_with_scopes PASSED                                                                                                                                     [100%]

==================================================================================================== FAILURES ====================================================================================================
______________________________________________________________________________________ TestChemClient.test_query_fetch_all _______________________________________________________________________________________

self = <tests.chem.TestChemClient testMethod=test_query_fetch_all>

    def test_query_fetch_all(self):
        # fetch_all won't work when caching is used.
        self.mc.stop_caching()
        q = "drugcentral.drug_use.contraindication.umls_cui:C0023530"
        qres = self.mc.query(q, size=0)
        total = qres["total"]
    
        qres = self.mc.query(q, fields="drugcentral.drug_use", fetch_all=True)
        self.assertTrue(isinstance(qres, types.GeneratorType))
>       self.assertEqual(total, len(list(qres)))
E       AssertionError: 117 != 72

tests/chem.py:175: AssertionError
----------------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------------------
INFO     biothings.client:base.py:499 Fetching 72 chem(s) . . .
ERROR    biothings.client:base.py:504 No more results to return.
_______________________________________________________________________________________ TestVariantClient.test_getvariants _______________________________________________________________________________________

self = <tests.variant.TestVariantClient testMethod=test_getvariants>

    def test_getvariants(self):
        v_li = self.mv.getvariants(self.query_list1)
        self.assertEqual(len(v_li), 9)
        self.assertEqual(v_li[0]["_id"], self.query_list1[0])
        self.assertEqual(v_li[1]["_id"], self.query_list1[1])
        self.assertEqual(v_li[2]["_id"], self.query_list1[2])
    
        self.mv.step = 4
        # test input is a string of comma-separated ids
        v_li2 = self.mv.getvariants(",".join(self.query_list1))
>       self.assertEqual(v_li, v_li2)
E       AssertionError: Lists differ: [{'query': 'chr1:g.866422C>T', '_id': 'chr1:g.866422C>[157270 chars]C'}}] != [{'query': 'c', 'notfound': True}, {'query': 'h', 'not[5007 chars]rue}]
E       
E       First differing element 0:
E       {'query': 'chr1:g.866422C>T', '_id': 'chr1:g.866422C>[14946 chars]np'}}
E       {'query': 'c', 'notfound': True}
E       
E       Second list contains 140 additional elements.
E       First extra element 9:
E       {'query': '6', 'notfound': True}
E       
E       Diff is 338954 characters long. Set self.maxDiff to None to see it.

tests/variant.py:87: AssertionError
----------------------------------------------------------------------------------------------- Captured log call ------------------------------------------------------------------------------------------------
INFO     biothings.client:base.py:255 querying 1-9...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 1-4...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 5-8...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 9-12...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 13-16...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 17-20...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 21-24...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 25-28...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 29-32...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 33-36...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 37-40...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 41-44...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 45-48...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 49-52...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 53-56...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 57-60...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 61-64...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 65-68...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 69-72...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 73-76...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 77-80...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 81-84...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 85-88...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 89-92...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 93-96...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 97-100...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 101-104...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 105-108...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 109-112...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 113-116...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 117-120...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 121-124...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 125-128...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 129-132...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 133-136...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 137-140...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 141-144...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 145-148...
INFO     biothings.client:base.py:261 done.
INFO     biothings.client:base.py:255 querying 149-149...
INFO     biothings.client:base.py:261 done.
_____________________________________________________________________________________ TestVariantClient.test_query_fetch_all _____________________________________________________________________________________

self = <tests.variant.TestVariantClient testMethod=test_query_fetch_all>

    def test_query_fetch_all(self):
        # fetch_all won't work when caching is used.
        self.mv.stop_caching()
        qres = self.mv.query("chr1:69500-70000", fields="chrom")
        total = qres["total"]
    
        qres = self.mv.query("chr1:69500-70000", fields="chrom", fetch_all=True)
        self.assertTrue(isinstance(qres, types.GeneratorType))
>       self.assertEqual(total, len(list(qres)))

tests/variant.py:143: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
biothings_client/base.py:497: in _fetch_all
    batch = _batch()
biothings_client/base.py:494: in _batch
    from_cache, ret = self._get(url, params=kwargs, verbose=verbose)
biothings_client/base.py:190: in _get
    res.raise_for_status()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Response [500]>

    def raise_for_status(self):
        """Raises :class:`HTTPError`, if one occurred."""
    
        http_error_msg = ""
        if isinstance(self.reason, bytes):
            # We attempt to decode utf-8 first because some servers
            # choose to localize their reason strings. If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings. (See PR #3538)
            try:
                reason = self.reason.decode("utf-8")
            except UnicodeDecodeError:
                reason = self.reason.decode("iso-8859-1")
        else:
            reason = self.reason
    
        if 400 <= self.status_code < 500:
            http_error_msg = (
                f"{self.status_code} Client Error: {reason} for url: {self.url}"
            )
    
        elif 500 <= self.status_code < 600:
            http_error_msg = (
                f"{self.status_code} Server Error: {reason} for url: {self.url}"
            )
    
        if http_error_msg:
>           raise HTTPError(http_error_msg, response=self)
E           requests.exceptions.HTTPError: 500 Server Error: search_phase_execution_exception for url: https://myvariant.info/v1/query/?fields=chrom&fetch_all=True&q=chr1%3A69500-70000

.tox/py311/lib/python3.11/site-packages/requests/models.py:1021: HTTPError
================================================================================================ warnings summary ================================================================================================
biothings_client/base.py:24
  /home/jschaff/workspace/biothings/biothings_client.py/biothings_client/base.py:24: DeprecationWarning: 
  Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
  (to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
  but was not found to be installed on your system.
  If this would cause problems for you,
  please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466
          
    from pandas import DataFrame, json_normalize

tests/gene.py::TestGeneClient::test_querymany_fields
tests/gene.py::TestGeneClient::test_querymany_fields
tests/gene.py::TestGeneClient::test_querymany_notfound
tests/gene.py::TestGeneClient::test_querymany_species
tests/gene.py::TestGeneClient::test_querymany_species
  /home/jschaff/workspace/biothings/biothings_client.py/biothings_client/mixins/gene.py:8: DeprecationWarning: Deprecated! Currently an alias of "querymany" method. Use "querymany" method directly.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================================ short test summary info =============================================================================================
FAILED tests/chem.py::TestChemClient::test_query_fetch_all - AssertionError: 117 != 72
FAILED tests/variant.py::TestVariantClient::test_getvariants - AssertionError: Lists differ: [{'query': 'chr1:g.866422C>T', '_id': 'chr1:g.866422C>[157270 chars]C'}}] != [{'query': 'c', 'notfound': True}, {'query': 'h', 'not[5007 chars]rue}]
FAILED tests/variant.py::TestVariantClient::test_query_fetch_all - requests.exceptions.HTTPError: 500 Server Error: search_phase_execution_exception for url: https://myvariant.info/v1/query/?fields=chrom&fetch_all=True&q=chr1%3A69500-70000
=================================================================== 3 failed, 82 passed, 2 skipped, 2 xfailed, 6 warnings in 176.25s (0:02:56) ===================================================================
py311: exit 1 (176.45 seconds) /home/jschaff/workspace/biothings/biothings_client.py> pytest -v /home/jschaff/workspace/biothings/biothings_client.py/tests/chem.py /home/jschaff/workspace/biothings/biothings_client.py/tests/gene.py /home/jschaff/workspace/biothings/biothings_client.py/tests/geneset.py /home/jschaff/workspace/biothings/biothings_client.py/tests/test.py /home/jschaff/workspace/biothings/biothings_client.py/tests/utils.py /home/jschaff/workspace/biothings/biothings_client.py/tests/variant.py pid=522667
.pkg: _exit> python /home/jschaff/workspace/biothings/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  py27: SKIP (0.01 seconds)
  py34: SKIP (0.00 seconds)
  py35: SKIP (0.00 seconds)
  py36: SKIP (0.00 seconds)
  py36-pandas: SKIP (0.00 seconds)
  py36-caching37: SKIP (0.00 seconds)
  py38: SKIP (0.00 seconds)
  py39: SKIP (0.00 seconds)
  py310: SKIP (0.00 seconds)
  py311: FAIL code 1 (178.81=setup[2.36]+cmd[176.45] seconds)
  evaluation failed :( (178.85 seconds)

@ctrl-schaff ctrl-schaff marked this pull request as ready for review February 27, 2024 22:55
Copy link
Member

@newgene newgene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just left one quick comments. I have a few other questions which we can go over at our meeting (or code review meeting in the afternoon)

biothings_client/base.py Outdated Show resolved Hide resolved
@ctrl-schaff ctrl-schaff changed the title Add CURIE ID query support Add CURIE ID query support (mygene support) Feb 29, 2024
@ctrl-schaff ctrl-schaff merged commit dabafbe into master May 29, 2024
5 of 21 checks passed
@ctrl-schaff ctrl-schaff deleted the add-curie-id-query-support branch May 29, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants