Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:

- name: Run protocol tests
run: |
make generate-protocol-tests test-protocols
make generate-protocol-tests test-protocols test-integration

- name: Type-check protocol test stubs
if: ${{ matrix.python-version == '3.12' }}
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DEFAULT_GOAL:=help

.PHONY: help install format-java check-java build-java test-protocols typecheck-protocols generate-protocol-tests generate-codegen-output-py api-snapshot ci lint-py check-py test-py benchmark build-py clean
.PHONY: help install format-java check-java build-java test-protocols typecheck-protocols generate-protocol-tests generate-codegen-output-py api-snapshot ci lint-py check-py test-py test-integration benchmark build-py clean

help: ## Show this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
Expand Down Expand Up @@ -98,14 +98,19 @@ ci: ## Runs the full CI sequence locally (mirrors the CI workflow steps).
make build-py
make build-java
make generate-codegen-output-py
make generate-protocol-tests test-protocols
make generate-protocol-tests test-protocols test-integration
make typecheck-protocols


test-py: ## Runs tests for the python packages.
uv run pytest packages


test-integration: ## Runs integration tests that drive generated clients over a real transport. Requires `make test-protocols` (or generate-protocol-tests) to have installed the generated clients first.
uv pip install h2 trustme "packages/smithy-http[awscrt]"
uv run pytest packages/*/tests/integration --no-cov


benchmark: ## Runs ser/deser throughput benchmarks (coverage disabled; not part of CI or the default test run).
uv run pytest packages/*/tests/benchmark --no-cov -s -q

Expand Down
5 changes: 4 additions & 1 deletion codegen-output/aws-json-1-0/src/awsjson10/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from smithy_core.shapes import ShapeID
from smithy_http.aio.aiohttp import AIOHTTPClient

from ._private.schemas import JSON_RPC10
from .auth import HTTPAuthSchemeResolver


Expand Down Expand Up @@ -124,7 +125,9 @@
_ServiceInterceptor = Any

_PROTOCOL_SETTINGS = ProtocolSettings(
namespace="aws.protocoltests.json10", service_target="JsonRpc10"
namespace="aws.protocoltests.json10",
service_target="JsonRpc10",
service_schema=JSON_RPC10,
)


Expand Down
5 changes: 4 additions & 1 deletion codegen-output/aws-json-1-1/src/awsjson11/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from smithy_core.shapes import ShapeID
from smithy_http.aio.aiohttp import AIOHTTPClient

from ._private.schemas import JSON_PROTOCOL
from .auth import HTTPAuthSchemeResolver


Expand Down Expand Up @@ -118,7 +119,9 @@
_ServiceInterceptor = Any

_PROTOCOL_SETTINGS = ProtocolSettings(
namespace="aws.protocoltests.json", service_target="JsonProtocol"
namespace="aws.protocoltests.json",
service_target="JsonProtocol",
service_schema=JSON_PROTOCOL,
)


Expand Down
6 changes: 5 additions & 1 deletion codegen-output/aws-query/src/awsquery/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from smithy_core.shapes import ShapeID
from smithy_http.aio.aiohttp import AIOHTTPClient

from ._private.schemas import AWS_QUERY
from .auth import HTTPAuthSchemeResolver


Expand Down Expand Up @@ -172,7 +173,10 @@
_ServiceInterceptor = Any

_PROTOCOL_SETTINGS = ProtocolSettings(
namespace="aws.protocoltests.query", service_target="AwsQuery", version="2020-01-08"
namespace="aws.protocoltests.query",
service_target="AwsQuery",
version="2020-01-08",
service_schema=AWS_QUERY,
)


Expand Down
6 changes: 5 additions & 1 deletion codegen-output/ec2-query/src/ec2query/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from smithy_core.shapes import ShapeID
from smithy_http.aio.aiohttp import AIOHTTPClient

from ._private.schemas import AWS_EC2
from .auth import HTTPAuthSchemeResolver


Expand Down Expand Up @@ -141,7 +142,10 @@
_ServiceInterceptor = Any

_PROTOCOL_SETTINGS = ProtocolSettings(
namespace="aws.protocoltests.ec2", service_target="AwsEc2", version="2020-01-08"
namespace="aws.protocoltests.ec2",
service_target="AwsEc2",
version="2020-01-08",
service_schema=AWS_EC2,
)


Expand Down
5 changes: 5 additions & 0 deletions codegen-output/my-handwritten-model/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- Code generated by smithy-python-codegen DO NOT EDIT. -->

## My Handwritten Model Client

my_handwritten_model client
71 changes: 71 additions & 0 deletions codegen-output/my-handwritten-model/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Code generated by smithy-python-codegen DO NOT EDIT.

[project]
name = "my_handwritten_model"
version = "0.0.1"
description = "my_handwritten_model client"
readme = "README.md"
requires-python = ">=3.12"
keywords = ["smithy", "my_handwritten_model"]
license = {text = "Apache-2.0"}
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15"
]

dependencies = [
"smithy_aws_core[eventstream]~=0.12.0",
"smithy_core~=0.9.0",
"smithy_http[cbor, aiohttp]~=0.6.0"
]

[project.optional-dependencies]
awscrt = [
"smithy_http[awscrt]~=0.6.0"
]

[dependency-groups]
test = [
"pytest>=9.0.1,<10.0.0",
"pytest-asyncio>=1.3.0,<1.4.0",
"smithy_test~=0.1.0"
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.pyright]
typeCheckingMode = "strict"
reportPrivateUsage = false
reportUnusedFunction = false
reportUnusedVariable = false
reportUnnecessaryComparison = false
reportUnusedClass = false
enableExperimentalFeatures = true
# models.py is the dynamic runtime; models.pyi carries the typed
# surface for consumers, so don't type-check the implementation body.
exclude = ["**/models.py"]

[tool.ruff]
target-version = "py312"

[tool.ruff.lint]
ignore = ["F841"]

[tool.ruff.format]
skip-magic-trailing-comma = true

[tool.pytest.ini_options]
python_classes = ["!Test"]
asyncio_mode = "auto"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Code generated by smithy-python-codegen DO NOT EDIT.

__version__: str = "0.0.1"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Code generated by smithy-python-codegen DO NOT EDIT.
Loading
Loading