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

refactor: create antismash downloader module and move there inherent code #127

Merged
merged 24 commits into from
Mar 20, 2023

Conversation

gcroci2
Copy link
Contributor

@gcroci2 gcroci2 commented Mar 15, 2023

  • I moved popd antismash download and extraction related stuff to nplinker/pairedomics/
  • I moved the code regarding antismash data download and extraction from pairedomics/downloader.py to genomics/antismash/antismash_downloader.py.
  • I refactored old function download_antismash_data, which now is deprecated, and created a new one download_and_extract_antismash_data, which takes as input a single item id to be used to retrieve Antismash data. In the refactored downloader for PoDP it will be inserted in a for loop to iterate over all the items available. The downloader module will be refactored in a different PR (see issue Refactor Downloader class to have a specific PoDP downloader #121).
  • I moved antismash tests to tests/antismash folder, calling them test_antismash_downloader.py and test_antismash_loader.py.
  • I've run prospector and static typing checks, and reordered imports on the new antismash files
  • I've added a proper docstring to the antismash downloader file

One test is still failing:

============================================================================= short test summary info =============================================================================
FAILED tests/genomics/test_genomics.py::test_map_strain_to_bgc_error - AssertionError: assert 'Not found BGC id BGC0000003 in BGC-geonme mappings.' in 'Not found BGC id BGC0000003 in BGC-genome mappings.'

Copy link
Member

@CunliangGeng CunliangGeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, see my comments below.

@gcroci2 gcroci2 requested a review from CunliangGeng March 16, 2023 18:49
Copy link
Member

@CunliangGeng CunliangGeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! A few more comments, almost there :-)

@gcroci2 gcroci2 requested a review from CunliangGeng March 17, 2023 12:04
Copy link
Member

@CunliangGeng CunliangGeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It's almost there, 4 more comments to go

@gcroci2 gcroci2 requested a review from CunliangGeng March 20, 2023 12:04
Copy link
Member

@CunliangGeng CunliangGeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your effort! PR approved 🎉
The test error you mentioned is fine, it's already fixed in dev branch.
Please Squash and merge the PR, then you can close it.

@gcroci2 gcroci2 merged commit 53a50c9 into dev Mar 20, 2023
@gcroci2 gcroci2 deleted the 98_add_antismash_downloader_fixed_gcroci2 branch March 20, 2023 16:11
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