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

Fix GeoSearch elink using retmode xml #200

Merged
merged 3 commits into from
Sep 17, 2023

Conversation

jggatter
Copy link
Contributor

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
Copy link
Contributor Author

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

@jggatter
Copy link
Contributor Author

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
Copy link
Owner

saketkc commented Sep 16, 2023

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

@codecov
Copy link

codecov bot commented Sep 16, 2023

Codecov Report

Patch coverage: 37.50% and project coverage change: -0.90% ⚠️

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
@@             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 Coverage Δ
pysradb/cli.py 0.00% <0.00%> (ø)
pysradb/download.py 27.90% <20.00%> (-0.49%) ⬇️
pysradb/search.py 78.40% <66.66%> (-1.69%) ⬇️
pysradb/__init__.py 100.00% <100.00%> (ø)
pysradb/sraweb.py 80.45% <100.00%> (-1.68%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@saketkc saketkc merged commit fb0a230 into saketkc:develop Sep 17, 2023
5 of 7 checks passed
@jggatter
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants