Skip to content

Commit

Permalink
feat: Add support for python3.13 (#512)
Browse files Browse the repository at this point in the history
* Add support for python3.13 init templates

* skip linting until until runtime is GA

* Change unit test class base to python313
  • Loading branch information
hnnasit authored Nov 7, 2024
1 parent f10c876 commit 994ec01
Show file tree
Hide file tree
Showing 260 changed files with 10,819 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build_test_invoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ jobs:
- version: '3.12'
type: 'Invoke'
file: 'tests/integration/build_invoke/python/test_python_3_12.py'
- version: '3.13'
type: 'Test'
file: 'tests/integration/unit_test/test_unit_test_python3_13.py'
- version: '3.13'
type: 'Invoke'
file: 'tests/integration/build_invoke/python/test_python_3_13.py'
env:
PYTHON_VERSION_INSTALL: ${{ matrix.version }}
runs-on: ubuntu-latest
Expand Down
93 changes: 93 additions & 0 deletions manifest-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,73 @@
"useCaseName": "Multi-step workflow with Connectors"
}
],
"python3.13": [
{
"directory": "python3.13/hello",
"displayName": "Hello World Example",
"dependencyManager": "pip",
"appTemplate": "hello-world",
"packageType": "Zip",
"useCaseName": "Hello World Example"
},
{
"directory": "python3.13/hello-pt",
"displayName": "Hello World Example with Powertools for AWS Lambda",
"dependencyManager": "pip",
"appTemplate": "hello-world-powertools-python",
"packageType": "Zip",
"useCaseName": "Hello World Example with Powertools for AWS Lambda"
},
{
"directory": "python3.13/event-bridge",
"displayName": "EventBridge Hello World",
"dependencyManager": "pip",
"appTemplate": "eventBridge-hello-world",
"packageType": "Zip",
"useCaseName": "Infrastructure event management"
},
{
"directory": "python3.13/event-bridge-schema",
"displayName": "EventBridge App from scratch (100+ Event Schemas)",
"dependencyManager": "pip",
"appTemplate": "eventBridge-schema-app",
"isDynamicTemplate": "True",
"packageType": "Zip",
"useCaseName": "Infrastructure event management"
},
{
"directory": "python3.13/step-func",
"displayName": "Step Functions Sample App (Stock Trader)",
"dependencyManager": "pip",
"appTemplate": "step-functions-sample-app",
"packageType": "Zip",
"useCaseName": "Multi-step workflow"
},
{
"directory": "python3.13/efs",
"displayName": "Elastic File System Sample App",
"dependencyManager": "pip",
"appTemplate": "efs-sample-app",
"packageType": "Zip",
"useCaseName": "Lambda EFS example"
},
{
"directory": "python3.13/web-conn",
"displayName": "Quick Start: Web Backend With Connectors",
"dependencyManager": "pip",
"appTemplate": "hello-world-connector",
"packageType": "Zip",
"useCaseName": "Serverless Connector Hello World Example"
},
{
"directory": "python3.13/step-func-conn",
"displayName": "Step Functions Sample App (Stock Trader) With Connectors",
"dependencyManager": "pip",
"appTemplate": "step-functions-with-connectors",
"packageType": "Zip",
"useCaseName": "Multi-step workflow with Connectors"
}
],
"ruby3.2": [
{
"directory": "ruby/hello",
Expand Down Expand Up @@ -1505,6 +1572,32 @@
"useCaseName": "Machine Learning"
}
],
"amazon/python3.13-base": [
{
"directory": "python3.13/hello-img",
"displayName": "Hello World Lambda Image Example",
"dependencyManager": "pip",
"appTemplate": "hello-world-lambda-image",
"packageType": "Image",
"useCaseName": "Hello World Example"
},
{
"directory": "python3.13/apigw-scikit",
"displayName": "Scikit-learn Machine Learning Inference API",
"dependencyManager": "pip",
"appTemplate": "ml-apigw-scikit-learn",
"packageType": "Image",
"useCaseName": "Machine Learning"
},
{
"directory": "python3.13/apigw-xgboost",
"displayName": "XGBoost Machine Learning Inference API",
"dependencyManager": "pip",
"appTemplate": "ml-apigw-xgboost",
"packageType": "Image",
"useCaseName": "Machine Learning"
}
],
"amazon/ruby3.2-base": [
{
"directory": "ruby/hello-img",
Expand Down
Empty file added python3.13/__init__.py
Empty file.
20 changes: 20 additions & 0 deletions python3.13/apigw-pytorch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Cookiecutter Machine Learning Inference API project

This is a cookiecutter template using [Serverless Application Model (SAM)](https://github.com/awslabs/serverless-application-model) to create a simple handwritten digit classifier deployed as an API.

## Requirements

* [AWS SAM CLI](https://github.com/awslabs/aws-sam-cli)

## Usage

Generate a boilerplate template in your current project directory using the following syntax:

`sam init`

> **NOTE**: ``--name`` allows you to specify a different project folder name (`sam-app` is the default)

# Credits

* This project has been generated with [Cookiecutter](https://github.com/audreyr/cookiecutter)
Empty file.
15 changes: 15 additions & 0 deletions python3.13/apigw-pytorch/cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"project_name": "digit_classifier",
"pytorch_version": "2.0.0",
"torchvision_version": "0.15.1",
"api_path": "/classify_digit",
"architectures": {
"value": [
"x86_64", "arm64"
]
},
"_copy_without_render": [
".gitignore"
],
"__stack_name": "{{ cookiecutter.project_name.lower().replace(' ', '-') }}"
}
2 changes: 2 additions & 0 deletions python3.13/apigw-pytorch/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[install]
prefix=
Loading

0 comments on commit 994ec01

Please sign in to comment.