saketkc / pysradb

Package for fetching metadata and downloading data from SRA/ENA/GEO
https://saketkc.github.io/pysradb
BSD 3-Clause "New" or "Revised" License
311 stars 51 forks source link

Tests for commands of the SRAweb module #23

Closed dibyaaaaax closed 4 years ago

dibyaaaaax commented 4 years ago

@saketkc could you please review the tests I have written? I will complete the rest of them once I am sure I'm going in the right direction.

saketkc commented 4 years ago

Looks good! Can you rebase with master? You might get conflicts, but they should be easy to resolve.

dibyaaaaax commented 4 years ago

I don't understand why Travis fails while running the tests. I didn't get any error while running them on my machine. @saketkc could you please help me out?

saketkc commented 4 years ago

Thanks @dibyaaaaax! This looks like a good solid test set. Sorry for the delay in getting back to you, I was traveling.

The failure on Python 3.7 appears to be a random failure. I have restarted the build. Let's see if it goes through. If not, I will have to dig deeper.

dibyaaaaax commented 4 years ago

Thank you @saketkc! Hope it works :smiley:

saketkc commented 4 years ago

Something still wrong with Py3.7. I will have to dig deeper.

saketkc commented 4 years ago

HI @dibyaaaaax, thanks for your continued patience. We are almost there. The error is because of tests exceeding the API rate limits. A simple fix wouldbe to add time.sleep(1) in the fixture:

@pytest.fixture(scope="module")
def sraweb_connection():
    db = SRAweb()
    time.sleep(1)
    return db
dibyaaaaax commented 4 years ago

@saketkc the API rate limit exceeds even with the sleep time.

saketkc commented 4 years ago

Can you give me edit permissions for this PR @dibyaaaaax? Thanks! https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork

dibyaaaaax commented 4 years ago

@saketkc you already have the edit permission.

saketkc commented 4 years ago

@dibyaaaaax, thanks a lot for this major effort! We are good to go to the master.

saketkc commented 4 years ago

Are you okay with me adding your Name to AUTHORS?

Contributors

dibyaaaaax commented 4 years ago

yeah sure, thanks a lot @saketkc!