Conversation
Refactored pyenzyme.fetcher.chebi to use the ChEBI search API for fetching entries, simplifying data models and result processing. Updated function signatures and logic to work with the new API response structure. Adjusted integration tests to expect httpx.HTTPStatusError for invalid PubChem IDs instead of ValueError.
Bumped mdmodels version requirement from >=0.2.1 to >=0.2.4 to ensure compatibility with recent updates and bug fixes.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Removed Python 3.10 from CI test matrices and set 'requires-python' to >=3.11 in pyproject.toml to ensure compatibility with newer Python versions.
Bumped required Python version to >=3.11, <4 and updated dependency markers for packages such as astropy, bokeh, and anyio. Removed version-specific constraints for numpy and contourpy, and updated astropy to version 7.2.0. This improves compatibility with newer Python releases and simplifies dependency management.
Deleted the test_legacy.py file which tested backward compatibility for loading and serializing EnzymeML v1 documents. This may indicate deprecation of legacy support or a cleanup of outdated tests.
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 refactors the ChEBI fetcher module to use the ChEBI search API for all chemical entity queries, streamlines data models, and simplifies result processing throughout the codebase. It also updates dependencies and improves error handling in both ChEBI and PubChem fetchers. The most important changes are grouped below:
ChEBI API Refactor & Data Model Updates:
ChEBIStructure,ChEBIEntryData,ChEBIEntryResult,ChEBIApiResponse) with new models (ChebiSearchSource,ChebiSearchResult,ChebiSearchResponse) that directly match the ChEBI search API response format. All fetch and search methods now use these new models.get_entry_by_id,get_entries_batch,search_entries) to use the ChEBI search API endpoint and returnChebiSearchSourceobjects instead of the previous entry result models. Batch fetching now iterates over IDs and calls the search API for each. [1] [2] [3]process_search_result, mapping ChEBI search results directly toSmallMoleculeobjects, and updated all usages in fetch, batch, and search functions. [1] [2] [3] [4]Error Handling Improvements:
httpxexceptions for HTTP errors, aligning error handling with the ChEBI fetcher.httpx.HTTPStatusErrorfor invalid IDs instead of a genericValueError.Dependency Updates:
mdmodelsdependency version inpyproject.tomlfrom0.2.1to0.2.4.This change is