widdowquinn / ncfp

Program and package that retrieves nucleotide coding sequences from NCBI that correspond to a set of input protein sequences.

Home Page:https://widdowquinn.github.io/ncfp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircleCI test error: Entrez calls failing

widdowquinn opened this issue · comments

Summary:

CI tests are failing due to connection issues against NCBI/Entrez

Description:

CircleCI's routine testing threw an error with an Entrez call. This appears to be relevant to #17

============================= test session starts ==============================
platform linux -- Python 3.8.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /home/circleci/repo/venv/bin/python3
cachedir: .pytest_cache
rootdir: /home/circleci/repo
plugins: cov-2.12.1
collecting ... collecting 3 items                                                             collected 7 items                                                              

tests/test_cli_parsing.py::test_bad_infile PASSED                        [ 14%]
tests/test_cli_parsing.py::test_create_and_keep_cache FAILED             [ 28%]
tests/test_cli_parsing.py::test_download_and_log PASSED                  [ 42%]
tests/test_ncfp.py::test_basic_ncbi PASSED                               [ 57%]
tests/test_ncfp.py::test_basic_uniprot PASSED                            [ 71%]
tests/test_ncfp.py::test_basic_stockholm SKIPPED (Database caching n...) [ 85%]
tests/test_ncfp.py::test_small_stockholm PASSED                          [100%]
------------------------------ Captured log call -------------------------------
WARNING  ncbi_cds_from_protein.entrez:entrez.py:329 ELing query (XP_005274161.1) failed (retry 1)
Traceback (most recent call last):
  File "/home/circleci/repo/ncbi_cds_from_protein/entrez.py", line 324, in elink_fetch_with_retries
    Entrez.elink(dbfrom=dbname, linkname=linkdbname, id=query_id)
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/Bio/Entrez/__init__.py", line 281, in elink
    return _open(cgi, variables)
  File "/home/circleci/repo/venv/lib/python3.8/site-packages/Bio/Entrez/__init__.py", line 606, in _open
    handle = urlopen(cgi)
  File "/usr/local/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/local/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/local/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 429: Too Many Requests

----------- coverage: platform linux, python 3.8.5-final-0 -----------
Coverage XML written to file .coverage.xml

=========================== short test summary info ============================
FAILED tests/test_cli_parsing.py::test_create_and_keep_cache - ncbi_cds_from_...
============== 1 failed, 5 passed, 1 skipped in 78.42s (0:01:18) ===============

Exited with code exit status 1

CircleCI received exit code 1

Expected Output:

Tests should pass.

ncfp Version:

0.2.0

Python Version:

3.6, 3.7, 3.8

Operating System:

Linux (at CircleCI)