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

refact: remove bento_lib coupling for config and server #25

Merged
merged 9 commits into from
Feb 10, 2025

Conversation

v-rocheleau
Copy link
Contributor

@v-rocheleau v-rocheleau commented Feb 6, 2025

This PR removes the usage of bento_lib to initialize the FastAPI app and Pydantic Settings.

The aim is to remove user-facing concepts that are specific to Bento, like environment variables prefixes, and service-info extensions.

These changes also allow adopters to use their own GA4GH service-info definitions.

Also includes a refactor that removes the ingestion router, since the ingestion is done from the experiment path.

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 97.08738% with 3 lines in your changes missing coverage. Please review.

Project coverage is 81.52%. Comparing base (1c26941) to head (c53ca22).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
transcriptomics_data_service/service_info.py 88.88% 1 Missing and 1 partial ⚠️
transcriptomics_data_service/main.py 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
+ Coverage   81.39%   81.52%   +0.12%     
==========================================
  Files          14       14              
  Lines         586      628      +42     
  Branches       30       32       +2     
==========================================
+ Hits          477      512      +35     
- Misses         98      103       +5     
- Partials       11       13       +2     

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

Copy link
Member

@davidlougheed davidlougheed left a comment

Choose a reason for hiding this comment

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

out of curiosity, what is the reason for adding duplicate code back in beyond funny BENTO_ prefixes of env vars?

@v-rocheleau
Copy link
Contributor Author

out of curiosity, what is the reason for adding duplicate code back in beyond funny BENTO_ prefixes of env vars?

Removing the BENTO_ prefixes from the env vars is one of the main reasons.
The Candig team and I are worried that relying on bento_lib for the pydantic Settings and FastAPI base class could become a compatibility issue in the future, since the plan for tds is to be platform agnostic.

Copy link
Contributor

@noctillion noctillion left a comment

Choose a reason for hiding this comment

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

LGTM!

@v-rocheleau v-rocheleau merged commit 615e49f into main Feb 10, 2025
7 checks passed
@v-rocheleau v-rocheleau deleted the refact/rm-bento-lib branch February 11, 2025 15:22
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.

3 participants