Skip to content

Add an App Engine Flexiable Python application. It is to demonstrate … #9191

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

Merged
merged 8 commits into from
Mar 3, 2023

Conversation

jinglundong
Copy link
Contributor

@jinglundong jinglundong commented Mar 1, 2023

Add an App Engine Flexiable Python application. It is to demonstrate the newly released Python 3.10 runtime on Ubuntu 22.
Documentation changes have been published to https://cloud.google.com/appengine/docs/flexible/python/runtime.

Description

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

I'm associated with Google and App Engine.

Checklist

  • I have followed Sample Guidelines from AUTHORING_GUIDE.MD. Notes: This guide requires tests for GAE Standard applications. This is not a Standard app. In addition, testing with stubs won't catch anything in this case.
  • README is updated to include all relevant information. Notes: Provided a README.md file at the new directory. Not needed at the individual app level at this point.
  • Tests pass: nox -s py-3.9 (see Test Environment Setup). Answer: Tested with nox -s py-3.10.
  • Lint pass: nox -s lint (see Test Environment Setup)
  • These samples need a new API enabled in testing projects to pass (let us know which ones). Answer: N/A.
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones). Answer: N/A.
  • Please merge this PR for me once it is approved.
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample. Answer: didn't add a top level directory.

…the newly released Python 3.10 runtime on Ubuntu 22. Documentation changes have been published to https://cloud.google.com/appengine/docs/flexible/python/runtime.
@jinglundong jinglundong requested review from a team as code owners March 1, 2023 00:41
@snippet-bot
Copy link

snippet-bot bot commented Mar 1, 2023

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: appengine Issues related to the App Engine Admin API API. labels Mar 1, 2023
@jinglundong
Copy link
Contributor Author

Tests failed. I'm taking a look.

@jinglundong
Copy link
Contributor Author

$ nox -s py-3.10
nox > Running session py-3.10
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/py-3-10
nox > python -m pip install -r requirements.txt
nox > python -m pip install -r requirements-test.txt
nox > pytest --junitxml=sponge_log.xml
============================================================================= test session starts ==============================================================================
platform linux -- Python 3.10.9, pytest-6.2.4, py-1.11.0, pluggy-0.13.1 -- /usr/local/google/home/jinglun/python-docs-samples/appengine/flexible_ubuntu/hello_world/.nox/py-3-10/bin/python
cachedir: .pytest_cache
rootdir: /usr/local/google/home/jinglun/python-docs-samples, configfile: pytest.ini
collected 1 item                                                                                                                                                               

main_test.py::test_index PASSED                                                                                                                                          [100%]

------------------------- generated xml file: /usr/local/google/home/jinglun/python-docs-samples/appengine/flexible_ubuntu/hello_world/sponge_log.xml --------------------------
============================================================================== 1 passed in 0.14s ===============================================================================
nox > Session py-3.10 was successful.


$ nox -s lint 
nox > Running session lint
nox > Creating virtual environment (virtualenv) using python3 in .nox/lint
nox > python -m pip install flake8 flake8-import-order flake8-annotations
nox > flake8 --show-source --builtin=gettext --max-complexity=20 --import-order-style=google '--exclude=.nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py' --ignore=ANN101,E121,E123,E126,E203,E226,E24,E266,E501,E704,W503,W504,I202 --max-line-length=88 --application-import-names main,noxfile_config,noxfile,.nox,main_test .
nox > Session lint was successful.

@jinglundong
Copy link
Contributor Author

All checks have passed. Please take a look m-strzelczyk.

@jinglundong
Copy link
Contributor Author

Friendly ping.

@jinglundong
Copy link
Contributor Author

HI @engelke, seems like @m-strzelczyk is out this week. Do you mind take a look?

Comment on lines 3 to 13
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file except in compliance with the License.
# # You may obtain a copy of the License at
# #
# # http://www.apache.org/licenses/LICENSE-2.0
# #
# # Unless required by applicable law or agreed to in writing, software
# # distributed under the License is distributed on an "AS IS" BASIS,
# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# # See the License for the specific language governing permissions and
# # limitations under the License.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix the repeated # in license header in this file and the others where it's doubled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching that! I've fixed this problem in main.py and main_test.py. PTAL.

Copy link
Contributor

@engelke engelke left a comment

Choose a reason for hiding this comment

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

LGTM

@jinglundong jinglundong merged commit 3e28b78 into main Mar 3, 2023
@jinglundong jinglundong deleted the jinglun-dev branch March 3, 2023 22:03
telpirion pushed a commit that referenced this pull request Mar 13, 2023
#9191)

* Add an App Engine Flexiable Python application. It is to demonstrate the newly released Python 3.10 runtime on Ubuntu 22. Documentation changes have been published to https://cloud.google.com/appengine/docs/flexible/python/runtime.

* Update copyright holder and license header.

* Attempt to fix nox tests.

* Add python type annotation.

* Update the license header.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: appengine Issues related to the App Engine Admin API API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants