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 query retry to PyCellBase v5 #562

Open
wants to merge 1 commit into
base: release-5.0.x
Choose a base branch
from

Conversation

julie-sullivan
Copy link
Contributor

This feature retries a query on timeout. After a wait period, retries N times.

  • Already merged this change into CellBase 4.x, published in GeL's PyPi
  • Not backwards compatible with Python 2.7. At all.
  • I updated the version to be v5.0.0
  • Didn't test the actual timeout and retry, not sure how to do that. For the 4.x version, GeL tested for me as they were experiencing a lot of CellBase timeouts.
  • Default URL doesn't exist anymore (see below)
  • Tests fail (see below)

@julie-sullivan
Copy link
Contributor Author

This URL doesn't exist anymore.

## These are the RESTful configurations parameters
rest:
  hosts:
  - "bioinfodev.hpc.cam.ac.uk/cellbase-5.0.0"
  timeout: 2000

@julie-sullivan
Copy link
Contributor Author

These tests fail without my change:

======================================================================
FAIL: test_get_clinical (tests.test_cbrestclients.GenomicRegionTest)
Checks retrieval of clinical data
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/julie/git/cellbase/cellbase-client/src/main/python/tests/test_cbrestclients.py", line 146, in test_get_clinical
    assert len(res[0]['result']) == 469
AssertionError

======================================================================
FAIL: test_get_substitution_scores (tests.test_cbrestclients.ProteinClientTest)
Checks retrieval of protein substitution scores
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/julie/git/cellbase/cellbase-client/src/main/python/tests/test_cbrestclients.py", line 76, in test_get_substitution_scores
    assert len(res[0]['result']) == 1
AssertionError

----------------------------------------------------------------------
Ran 41 tests in 194.136s

@julie-sullivan julie-sullivan changed the title Add query retry to Pycellbase Add query retry to PyCellBase v5 Jul 6, 2021
@imedina imedina added this to the v5.0.0 milestone Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants