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

feat: fastapi-framework init profile and extension #1868

Merged
merged 10 commits into from
Sep 17, 2024

Conversation

javierdelapuente
Copy link
Contributor

This PR implements the spec ISD160 - 12-Factor FastAPI Support" for charmcraft.

For that, a new init profile called "fastapi-framework" and a new fastapi extension, called "fastapi-framework" are needed. These additions are similar to the flask and django init profiles and extensions.

For the fastapi profile, the base 24.04 is used.

@javierdelapuente javierdelapuente marked this pull request as ready for review August 30, 2024 09:12
@lengau lengau requested review from a team and mr-cal September 6, 2024 04:40
Copy link
Contributor

@mr-cal mr-cal left a comment

Choose a reason for hiding this comment

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

Assuming the extension works, this looks good to me.

@lengau, do you typically write spread tests for extensions in charmcraft?

Copy link
Collaborator

@lengau lengau left a comment

Choose a reason for hiding this comment

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

Good catch @mr-cal!

@javierdelapuente could you modify tests/spread/commands/init-flask-framework to test this?

As a rough step-by-step:

  1. Rename the directory to init-extensions
  2. Create flask and fastapi variants, setting the PROFILE environment variable to the relevant profile
  3. Change the charmcraft init command to use --profile ${PROFILE}

@javierdelapuente
Copy link
Contributor Author

Good catch @mr-cal!

@javierdelapuente could you modify tests/spread/commands/init-flask-framework to test this?

As a rough step-by-step:

  1. Rename the directory to init-extensions
  2. Create flask and fastapi variants, setting the PROFILE environment variable to the relevant profile
  3. Change the charmcraft init command to use --profile ${PROFILE}

@lengau!, I have done it that way for all the missing frameworks (also go).

Copy link
Collaborator

@lengau lengau left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@lengau lengau added this pull request to the merge queue Sep 17, 2024
Merged via the queue into canonical:main with commit ec881a4 Sep 17, 2024
20 checks passed
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.

4 participants