Open
Conversation
Local strain mappings (NPLinker#310)
…n for better readabiliy
…ieval into distinct functions for improved clarity
…/nplinker into feature/antismash-jobs
…_md5_sums for consistency
…on for better organization
…ror handling in antismash_job_is_done
…remove return value documentation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the handling of antiSMASH BGC data in PODP mode by checking for pre‐downloaded data before fetching new data and refactors various related modules. Key changes include:
- Renaming and updating schema fields (e.g., "resolved_refseq_id" to "resolved_id" and "resolve_attempted" to "failed_previously") in tests and production code.
- Introducing new functions such as process_existing_antismash_data, download_and_extract_from_antismash_db, and enhancing antiSMASH API and NCBI download handling.
- Updating dependency types and workflow configuration to support the new functionality.
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/schemas/test_genome_status_schema.py | Updated test cases to reflect refactored genome status fields. |
| tests/unit/genomics/* | Adjusted tests to use new naming convention and integration with updated genome status and downloader functions. |
| src/nplinker/genomics/antismash/podp_antismash_downloader.py | Refactored genome status handling and BGC data retrieval using new resolver and downloader methods. |
| src/nplinker/genomics/antismash/antismash_downloader.py | Updated API for downloading/extracting antiSMASH data; added support for both API and database sources. |
| src/nplinker/genomics/antismash/antismash_api_client.py | Introduced job submission and status APIs for antiSMASH with minor spelling issues corrected. |
| pyproject.toml and GitHub workflows | Updated dependency lists to reflect new type stubs. |
Files not reviewed (1)
- src/nplinker/schemas/genome_status_schema.json: Language not supported
Comments suppressed due to low confidence (1)
src/nplinker/genomics/antismash/antismash_downloader.py:123
- The parameter name 'antimash_id' appears to be a misspelling; it should be 'antismash_id' to be consistent.
def extract_antismash_data(archive: str | PathLike, extract_root: str | PathLike, antimash_id: str) -> None:
Comment on lines
+65
to
+70
| respose_data = response.json() | ||
|
|
||
| if "state" not in respose_data: | ||
| raise ValueError(f"Job state missing in response for job_id: {job_id}") | ||
|
|
||
| job_state = respose_data["state"] |
There was a problem hiding this comment.
The variable 'respose_data' seems to be misspelled; consider renaming it to 'response_data' for clarity.
Suggested change
| respose_data = response.json() | |
| if "state" not in respose_data: | |
| raise ValueError(f"Job state missing in response for job_id: {job_id}") | |
| job_state = respose_data["state"] | |
| response_data = response.json() | |
| if "state" not in response_data: | |
| raise ValueError(f"Job state missing in response for job_id: {job_id}") | |
| job_state = response_data["state"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request enhances the handling of antiSMASH BGC data in PODP mode by checking for already downloaded files before fetching new data.
It builds upon pull request #315 and introduces the following improvements:
bgc_path