agent-claw: automated task changes
This commit is contained in:
19
cdk/node_modules/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py
generated
vendored
Normal file
19
cdk/node_modules/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
from aws_cdk import (
|
||||
# Duration,
|
||||
Stack,
|
||||
# aws_sqs as sqs,
|
||||
)
|
||||
from constructs import Construct
|
||||
|
||||
class %name.PascalCased%Stack(Stack):
|
||||
|
||||
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
|
||||
super().__init__(scope, construct_id, **kwargs)
|
||||
|
||||
# The code that defines your stack goes here
|
||||
|
||||
# example resource
|
||||
# queue = sqs.Queue(
|
||||
# self, "%name.PascalCased%Queue",
|
||||
# visibility_timeout=Duration.seconds(300),
|
||||
# )
|
||||
0
cdk/node_modules/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/__init__.py
generated
vendored
Normal file
0
cdk/node_modules/aws-cdk/lib/init-templates/app/python/%name.PythonModule%/__init__.py
generated
vendored
Normal file
10
cdk/node_modules/aws-cdk/lib/init-templates/app/python/.template.gitignore
generated
vendored
Normal file
10
cdk/node_modules/aws-cdk/lib/init-templates/app/python/.template.gitignore
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
*.swp
|
||||
package-lock.json
|
||||
__pycache__
|
||||
.pytest_cache
|
||||
.venv
|
||||
*.egg-info
|
||||
|
||||
# CDK asset staging directory
|
||||
.cdk.staging
|
||||
cdk.out
|
||||
58
cdk/node_modules/aws-cdk/lib/init-templates/app/python/README.template.md
generated
vendored
Normal file
58
cdk/node_modules/aws-cdk/lib/init-templates/app/python/README.template.md
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
# Welcome to your CDK Python project!
|
||||
|
||||
This is a blank project for CDK development with Python.
|
||||
|
||||
The `cdk.json` file tells the CDK Toolkit how to execute your app.
|
||||
|
||||
This project is set up like a standard Python project. The initialization
|
||||
process also creates a virtualenv within this project, stored under the `.venv`
|
||||
directory. To create the virtualenv it assumes that there is a `python3`
|
||||
(or `python` for Windows) executable in your path with access to the `venv`
|
||||
package. If for any reason the automatic creation of the virtualenv fails,
|
||||
you can create the virtualenv manually.
|
||||
|
||||
To manually create a virtualenv on MacOS and Linux:
|
||||
|
||||
```
|
||||
$ %python-executable% -m venv .venv
|
||||
```
|
||||
|
||||
After the init process completes and the virtualenv is created, you can use the following
|
||||
step to activate your virtualenv.
|
||||
|
||||
```
|
||||
$ source .venv/bin/activate
|
||||
```
|
||||
|
||||
If you are a Windows platform, you would activate the virtualenv like this:
|
||||
|
||||
```
|
||||
% .venv\Scripts\activate.bat
|
||||
```
|
||||
|
||||
Once the virtualenv is activated, you can install the required dependencies.
|
||||
|
||||
```
|
||||
$ pip install -r requirements.txt
|
||||
```
|
||||
|
||||
At this point you can now synthesize the CloudFormation template for this code.
|
||||
|
||||
```
|
||||
$ cdk synth
|
||||
```
|
||||
|
||||
To add additional dependencies, for example other CDK libraries, just add
|
||||
them to your `requirements.txt` file and rerun the `python -m pip install -r requirements.txt`
|
||||
command.
|
||||
|
||||
## Useful commands
|
||||
|
||||
* `cdk ls` list all stacks in the app
|
||||
* `cdk synth` emits the synthesized CloudFormation template
|
||||
* `cdk deploy` deploy this stack to your default AWS account/region
|
||||
* `cdk diff` compare deployed stack with current state
|
||||
* `cdk docs` open CDK documentation
|
||||
|
||||
Enjoy!
|
||||
28
cdk/node_modules/aws-cdk/lib/init-templates/app/python/app.template.py
generated
vendored
Normal file
28
cdk/node_modules/aws-cdk/lib/init-templates/app/python/app.template.py
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
|
||||
import aws_cdk as cdk
|
||||
|
||||
from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack
|
||||
|
||||
|
||||
app = cdk.App()
|
||||
%name.PascalCased%Stack(app, "%stackname%",
|
||||
# If you don't specify 'env', this stack will be environment-agnostic.
|
||||
# Account/Region-dependent features and context lookups will not work,
|
||||
# but a single synthesized template can be deployed anywhere.
|
||||
|
||||
# Uncomment the next line to specialize this stack for the AWS Account
|
||||
# and Region that are implied by the current CLI configuration.
|
||||
|
||||
#env=cdk.Environment(account=os.getenv('CDK_DEFAULT_ACCOUNT'), region=os.getenv('CDK_DEFAULT_REGION')),
|
||||
|
||||
# Uncomment the next line if you know exactly what Account and Region you
|
||||
# want to deploy the stack to. */
|
||||
|
||||
#env=cdk.Environment(account='123456789012', region='us-east-1'),
|
||||
|
||||
# For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html
|
||||
)
|
||||
|
||||
app.synth()
|
||||
15
cdk/node_modules/aws-cdk/lib/init-templates/app/python/cdk.template.json
generated
vendored
Normal file
15
cdk/node_modules/aws-cdk/lib/init-templates/app/python/cdk.template.json
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"app": "%python-executable% app.py",
|
||||
"watch": {
|
||||
"include": ["**"],
|
||||
"exclude": [
|
||||
"README.md",
|
||||
"cdk*.json",
|
||||
"requirements*.txt",
|
||||
"source.bat",
|
||||
"**/__init__.py",
|
||||
"**/__pycache__",
|
||||
"tests"
|
||||
]
|
||||
}
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk/lib/init-templates/app/python/requirements-dev.txt
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk/lib/init-templates/app/python/requirements-dev.txt
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
pytest==8.4.2
|
||||
2
cdk/node_modules/aws-cdk/lib/init-templates/app/python/requirements.txt
generated
vendored
Normal file
2
cdk/node_modules/aws-cdk/lib/init-templates/app/python/requirements.txt
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
aws-cdk-lib%cdk-version%
|
||||
constructs%constructs-version%
|
||||
13
cdk/node_modules/aws-cdk/lib/init-templates/app/python/source.bat
generated
vendored
Normal file
13
cdk/node_modules/aws-cdk/lib/init-templates/app/python/source.bat
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
@echo off
|
||||
|
||||
rem The sole purpose of this script is to make the command
|
||||
rem
|
||||
rem source .venv/bin/activate
|
||||
rem
|
||||
rem (which activates a Python virtualenv on Linux or Mac OS X) work on Windows.
|
||||
rem On Windows, this command just runs this batch file (the argument is ignored).
|
||||
rem
|
||||
rem Now we don't need to document a Windows command for activating a virtualenv.
|
||||
|
||||
echo Executing .venv\Scripts\activate.bat for you
|
||||
.venv\Scripts\activate.bat
|
||||
0
cdk/node_modules/aws-cdk/lib/init-templates/app/python/tests/__init__.py
generated
vendored
Normal file
0
cdk/node_modules/aws-cdk/lib/init-templates/app/python/tests/__init__.py
generated
vendored
Normal file
0
cdk/node_modules/aws-cdk/lib/init-templates/app/python/tests/unit/__init__.py
generated
vendored
Normal file
0
cdk/node_modules/aws-cdk/lib/init-templates/app/python/tests/unit/__init__.py
generated
vendored
Normal file
15
cdk/node_modules/aws-cdk/lib/init-templates/app/python/tests/unit/test_%name.PythonModule%_stack.template.py
generated
vendored
Normal file
15
cdk/node_modules/aws-cdk/lib/init-templates/app/python/tests/unit/test_%name.PythonModule%_stack.template.py
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import aws_cdk as core
|
||||
import aws_cdk.assertions as assertions
|
||||
|
||||
from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack
|
||||
|
||||
# example tests. To run these tests, uncomment this file along with the example
|
||||
# resource in %name.PythonModule%/%name.PythonModule%_stack.py
|
||||
def test_sqs_queue_created():
|
||||
app = core.App()
|
||||
stack = %name.PascalCased%Stack(app, "%name.StackName%")
|
||||
template = assertions.Template.from_stack(stack)
|
||||
|
||||
# template.has_resource_properties("AWS::SQS::Queue", {
|
||||
# "VisibilityTimeout": 300
|
||||
# })
|
||||
Reference in New Issue
Block a user