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.
Thank you for taking your time to contribute to Ersilia, just a few checks before we proceed
Description
Improved template resolver to use FastAPI as a prioritary option and deal with FastAPI versions.
Status
Done
Is this pull request related to any open issue? If yes, replace issueID below with the issue ID
Related to #1562
Copilot generated text below
This pull request introduces several changes to the
ersilia
package, focusing on enhancing FastAPI support, improving error handling, and adding new utility functions. Here are the most important changes:Enhancements to FastAPI support:
FASTAPI_APPROVED_PYTHON_VERSIONS
to the list of approved Python versions inersilia/default.py
.is_fastapi
method inersilia/hub/fetch/actions/template_resolver.py
to include additional checks for required files and validate the Python version specified in the Dockerfile.Error handling improvements:
WithToolFetchingNotWorking
inersilia/utils/exceptions_utils/fetch_exceptions.py
to handle cases where fetching with specific tools fails._fetch_not_from_dockerhub
method inersilia/hub/fetch/fetch.py
to raiseWithToolFetchingNotWorking
when fetching with FastAPI or BentoML fails.Utility function additions:
_less_on_file
method inersilia/hub/fetch/register/standard_example.py
to read and format a CSV file for logging purposes.