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

App Scaffold #478

Merged
merged 3 commits into from
Jun 4, 2024
Merged

App Scaffold #478

merged 3 commits into from
Jun 4, 2024

Conversation

BenoitDherin
Copy link
Collaborator

@BenoitDherin BenoitDherin commented May 28, 2024

This PR implements the first part of an app scaffold to be deployed on AppEngine.

It contains:

  • a small UI written in ./app/static
  • a simple Flask server in ./app/server.py
  • the deployment scripts in ./scripts
  • a Makefile with targets to create the virtual environment (make venv), to run the app locally (make run), to deploy the app on AppEngine with make deploy.
  • a test folder with tests to be ran using make tests

For now, the app is dummy, returning to the user only what the user enters. The app logic will come as a follow-up PR.

Testing notes: Test the app locally on your laptop or on CloudShell following the step in the README.md. (For CloudShell skip the instructions about installing and authenticating the gcloud CLI.)

@BenoitDherin BenoitDherin marked this pull request as draft May 28, 2024 23:18
scaffolds/app_engine/app/server.py Dismissed Show dismissed Hide dismissed
@BenoitDherin BenoitDherin self-assigned this May 29, 2024
@BenoitDherin BenoitDherin marked this pull request as ready for review May 29, 2024 22:13
Copy link
Collaborator

@sanjanalreddy sanjanalreddy left a comment

Choose a reason for hiding this comment

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

Thank you for adding this Benoit! Every thing worked well for me!

@@ -0,0 +1,19 @@
# This file specifies files that are *not* uploaded to Google Cloud
Copy link
Collaborator

Choose a reason for hiding this comment

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

not -> should not be

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!


The workflow described here works from CloudShell or any node with the [gcloud CLI](https://cloud.google.com/sdk/docs/install) has been properly installed and authenticated.

This means that you can develop your application fully locally on your laptop for example, as long as you have run `make auth` after installing the [gcloud CLI](https://cloud.google.com/sdk/docs/install) on it.
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove "fully"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@@ -0,0 +1,51 @@
async function queryApi(prompt) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a comment at the top of this file to describe what this file is doing. Since there's so many files it'll be good to know what the purpose of this file is.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

Copy link
Collaborator

@takumiohym takumiohym left a comment

Choose a reason for hiding this comment

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

LGTM! Left a minor comment.
Also, I think it's better to name the directory under scaffolds to more specific name instead of generic app_engine so that we can add more scaffolding examples here. @BenoitDherin



@app.route("/myapp", methods=["GET"])
def _answernaut():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe remove this internal code name and use more generic one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll do both! Thanks @takumiohym .

@BenoitDherin BenoitDherin merged commit a762bda into master Jun 4, 2024
5 checks passed
@takumiohym takumiohym deleted the app-scaffold-benoit branch January 8, 2025 09:43
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