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

Adding support for fastapi.FastAPI kwargs #9

Merged
merged 3 commits into from
Dec 6, 2023
Merged

Conversation

xaviernogueira
Copy link
Member

Problem: There are use cases where one might want to customize the fastapi.FastAPI app via keyword arguments (docs here). Previously, there as no option to do so.

Solution: A new, optional, fastapi_kwargs argument for catalog_to_xpublish.create_app()! These arguments are passed directly into fastapi.FastAPI except for "title", which is overridden by param:app_name (a warning if given if these conflict). I added test coverage for this new feature as well.

@xaviernogueira xaviernogueira added the enhancement New feature or request label Dec 6, 2023
@xaviernogueira xaviernogueira self-assigned this Dec 6, 2023
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (main@aab6928). Click here to learn what that means.

Files Patch % Lines
src/catalog_to_xpublish/server_functions.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main       #9   +/-   ##
=======================================
  Coverage        ?   85.91%           
=======================================
  Files           ?       18           
  Lines           ?      646           
  Branches        ?        0           
=======================================
  Hits            ?      555           
  Misses          ?       91           
  Partials        ?        0           

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

@xaviernogueira xaviernogueira marked this pull request as ready for review December 6, 2023 23:28
@xaviernogueira xaviernogueira merged commit 9731e0f into main Dec 6, 2023
2 checks passed
@xaviernogueira xaviernogueira deleted the fastapi_kwargs branch December 6, 2023 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant