Skip to content

Native types cli integration - #866

Open
stobrien89 wants to merge 1 commit into
native-model-codegenfrom
native-types-cli-integration
Open

stobrien89 wants to merge 1 commit into
native-model-codegenfrom
native-types-cli-integration

Conversation

@stobrien89

Copy link
Copy Markdown
Contributor

Issue #, if available:
#797

Description

Completes the native standalone types pipeline by wiring schema and lazy model generation into smithy-python generate types.

  • Adds types-specific CLI settings and selection.
  • Generates package metadata, initializers, and typing markers.
  • Publishes output through the file manifest.
  • Adds CLI tests and a versioned codegen-output-py snapshot.

This PR is stacked on #863.

Follow-up work

  • Partition large generated schema and model modules.
  • Migrate standalone types artifacts from the Java generator.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@stobrien89
stobrien89 added this pull request to stack #864 October 24, 2026 17:45
@stobrien89
stobrien89 force-pushed the native-types-cli-integration branch from 44b38e6 to 58549c6 Compare October 24, 2026 17:48
@stobrien89
stobrien89 requested a balanced review from Copilot October 24, 2026 17:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Accepted import package names can produce invalid distribution metadata, leaving generated packages unbuildable.

1 open issue
What changed in this PR

Completes the native standalone types CLI pipeline, building on lazy model generation in #863 and advancing the Python generator migration in #797.

Changes:

  • Connects types-specific CLI settings to selection, schema generation, and lazy model generation.
  • Generates package metadata, initializers, and typing markers, then publishes through the file manifest.
  • Adds CLI coverage and updates the versioned output snapshot.
File Description
scripts/​codegen-output-py/​generate.py Generates the snapshot through the CLI.
packages/​smithy-python/​tests/​unit/​test_selection.py Updates selection tests for working types generation.
packages/​smithy-python/​tests/​unit/​test_cli.py Tests package output, settings, and validation.
packages/​smithy-python/​src/​smithy_python/​types.py Assembles complete standalone types packages.
packages/​smithy-python/​src/​smithy_python/​cli.py Adds types options and invokes generation.
packages/​smithy-python/​README.md Documents available types generation.
codegen-output-py/​types/​src/​example_types/​py.typed Marks the generated package as typed.
codegen-output-py/​types/​src/​example_types/​_private/​__init__.py Initializes the private package.
codegen-output-py/​types/​src/​example_types/​__init__.py Exposes the generated package version.
codegen-output-py/​types/​README.md Adds generated package documentation.
codegen-output-py/​types/​pyproject.toml Adds build metadata and tooling settings.
codegen-output-py/​types/​.smithy-python-manifest.json Tracks the additional generated files.

Review effort: Balanced

Comment thread packages/smithy-python/src/smithy_python/types.py

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Accepted package descriptions containing U+007F produce invalid TOML metadata, preventing the generated package from being built.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread packages/smithy-python/src/smithy_python/types.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Invalid package versions pass CLI validation and produce metadata that prevents the generated package from being built or installed.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread packages/smithy-python/src/smithy_python/cli.py Outdated
@stobrien89
stobrien89 force-pushed the native-types-cli-integration branch from 91f5e28 to df06c4c Compare October 24, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review identified no blocking issues in the CLI integration, package generation, or snapshot updates; project tests were not executed.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@stobrien89
stobrien89 marked this pull request as ready for review October 24, 2026 18:49
@stobrien89
stobrien89 requested a review from a team as a code owner October 24, 2026 18:49
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.

2 participants