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
303 stars 49 forks source link

Fix GeoSearch elink using retmode xml #200

Closed jggatter closed 11 months ago

jggatter commented 11 months ago

test_geo_search_1 was failing on all branches. The eLink request within GeoSearch.search() seemed to return an empty body despite receiving status code 200 and healthy response headers. Changing 'retmode': 'xml' seems to generate the desired output.

The test seems to take a long time to run. I tested the code I changed to make sure it wasn't the cause. I'm not sure whether this performance differs from calls made in the past.

It may be worth reaching out to NCBI to understand why the request with 'retmode': 'json' stopped working.

This should unblock #198 #199 and any future PRs

jggatter commented 11 months ago

Ah wow, that's a lot of flake8 violations.

jggatter commented 11 months ago

Happy to address them, but not sure if you have your own opinions about these rules.

Furthermore, a tool like pre-commit could be useful.

saketkc commented 11 months ago

Thanks for your PR and contributions! Easisest way to fix the flake8 issues is to run black.

codecov[bot] commented 11 months ago

Codecov Report

Patch coverage: 37.50% and project coverage change: -0.90% :warning:

Comparison is base (cd33b70) 59.53% compared to head (06d8441) 58.63%. Report is 21 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #200 +/- ## =========================================== - Coverage 59.53% 58.63% -0.90% =========================================== Files 8 8 Lines 1893 1893 =========================================== - Hits 1127 1110 -17 - Misses 766 783 +17 ``` | [Files Changed](https://app.codecov.io/gh/saketkc/pysradb/pull/200?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [pysradb/cli.py](https://app.codecov.io/gh/saketkc/pysradb/pull/200?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHlzcmFkYi9jbGkucHk=) | `0.00% <0.00%> (ø)` | | | [pysradb/download.py](https://app.codecov.io/gh/saketkc/pysradb/pull/200?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHlzcmFkYi9kb3dubG9hZC5weQ==) | `27.90% <20.00%> (-0.49%)` | :arrow_down: | | [pysradb/search.py](https://app.codecov.io/gh/saketkc/pysradb/pull/200?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHlzcmFkYi9zZWFyY2gucHk=) | `78.40% <66.66%> (-1.69%)` | :arrow_down: | | [pysradb/\_\_init\_\_.py](https://app.codecov.io/gh/saketkc/pysradb/pull/200?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHlzcmFkYi9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | [pysradb/sraweb.py](https://app.codecov.io/gh/saketkc/pysradb/pull/200?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHlzcmFkYi9zcmF3ZWIucHk=) | `80.45% <100.00%> (-1.68%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jggatter commented 11 months ago

Thanks so much for merging and publishing the PRs! If you're looking for more contributions let me know!