Add comprehensive XML documentation to PythonLanguageSupport public API#14744
Merged
Conversation
…embers Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Address feedback on PythonAppHost code generator
Add comprehensive XML documentation to PythonLanguageSupport public API
Feb 26, 2026
annatisch
approved these changes
Feb 26, 2026
sebastienros
added a commit
that referenced
this pull request
Mar 26, 2026
* Start porting over Python API * Merged latest changes * Update to module builder * Support recursive interface collection * Fix interfaces * Support sync and async variants * More merging * Fixed merge * Updates * Updates * Fixed generic interface * Update AspireList * Cached properties * Added resource constructors with kwargs * Fixed ABCs and list/dict registration * Fix handles and logging * Fix some tests * More test fixes * Update python lookup * Fix Python CodeGeneration build errors and update tests - Add XML documentation to AtsPythonCodeGenerator class - Remove unused 'using System.Text;' and 'using Aspire.Hosting.ApplicationModel;' directives - Update test file key from 'aspire.py' to '__init__.py' to match generator output - Update test assertions to use actual generated method names (with_env instead of with_environment) - Update verified snapshots to match new generator output * Patch files * Fix Python polyglot validation test to match scaffold output The scaffold generates 'builder.run()' but the validation test was looking for 'builder.build().run()'. Updated the grep/sed pattern to match the actual scaffold output. * Update Go, Java, and Rust CodeGeneration test snapshots Updated verified snapshots to match current scanner output after main merge. * Fix Python validation test indentation The inserted Redis code needs proper 4-space indentation to be valid inside the Python 'with' block. * Improvements to errors + rename * Regenerate snapshots * Revert fallback cast error handling * Add missing XML documentation to PythonModuleBuilder public members (#14743) * Initial plan * Add missing XML documentation to MethodParameters property and DistributedApplicationBuilder constant Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> * Add comprehensive XML documentation to PythonLanguageSupport public API (#14744) * Initial plan * Add comprehensive XML documentation to PythonLanguageSupport public members Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> * Add descriptive XML documentation for AtsTypeRef.ImplementedInterfaces and AtsTypeRef.BaseType (#14746) * Initial plan * Improve XML documentation for ImplementedInterfaces and BaseType on AtsTypeRef Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> * Re-record tests * Remove extra project reference * Re-record tests * Re-record tests * Restructure packaging * Refactored aspire module to single file * Generate to .modules * Generate modules before installing * Support conditional ref expr * Remove additionalArgs * Tests * Renames to prevent naming conflicts * Group similar overloads * Support param defaults * Update Python codegen snapshots Accept regenerated Python snapshots after the cancellation token and process timeout fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix polyglot and CLI template validation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add Python polyglot playground validation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Skip unsupported Python SDK playgrounds Exclude Azure.Sql, Foundry, and Maui from Python polyglot playground validation until Python code generation supports their current API surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Python codegen naming conflicts Sanitize Python identifiers derived from capability parameters and derive generic Python type names without leaking CLR assembly metadata so the Python playground validation can cover Azure.Sql, Foundry, and Maui again. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refresh Python playground apphosts Remove the stale .modules sys.path bootstrap from the generated Python playground ValidationAppHosts so they match the shared Python scaffold, and add a regression test to keep new scaffolds importing aspire_app directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove Python scaffold assertion test Drop the implementation-shaped Python scaffold test and rely on the existing generated-output verification for this area. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add PythonAppHost playground Create a Python AppHost playground that orchestrates a Redis cache, a Uvicorn-hosted Python app, and a Vite frontend that references the Python service. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update Python codegen snapshot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Java validation selection Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix describe replica test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Sebastien Ros <sebastienros@gmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
adamint
pushed a commit
to adamint/aspire
that referenced
this pull request
Mar 28, 2026
* Start porting over Python API * Merged latest changes * Update to module builder * Support recursive interface collection * Fix interfaces * Support sync and async variants * More merging * Fixed merge * Updates * Updates * Fixed generic interface * Update AspireList * Cached properties * Added resource constructors with kwargs * Fixed ABCs and list/dict registration * Fix handles and logging * Fix some tests * More test fixes * Update python lookup * Fix Python CodeGeneration build errors and update tests - Add XML documentation to AtsPythonCodeGenerator class - Remove unused 'using System.Text;' and 'using Aspire.Hosting.ApplicationModel;' directives - Update test file key from 'aspire.py' to '__init__.py' to match generator output - Update test assertions to use actual generated method names (with_env instead of with_environment) - Update verified snapshots to match new generator output * Patch files * Fix Python polyglot validation test to match scaffold output The scaffold generates 'builder.run()' but the validation test was looking for 'builder.build().run()'. Updated the grep/sed pattern to match the actual scaffold output. * Update Go, Java, and Rust CodeGeneration test snapshots Updated verified snapshots to match current scanner output after main merge. * Fix Python validation test indentation The inserted Redis code needs proper 4-space indentation to be valid inside the Python 'with' block. * Improvements to errors + rename * Regenerate snapshots * Revert fallback cast error handling * Add missing XML documentation to PythonModuleBuilder public members (microsoft#14743) * Initial plan * Add missing XML documentation to MethodParameters property and DistributedApplicationBuilder constant Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> * Add comprehensive XML documentation to PythonLanguageSupport public API (microsoft#14744) * Initial plan * Add comprehensive XML documentation to PythonLanguageSupport public members Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> * Add descriptive XML documentation for AtsTypeRef.ImplementedInterfaces and AtsTypeRef.BaseType (microsoft#14746) * Initial plan * Improve XML documentation for ImplementedInterfaces and BaseType on AtsTypeRef Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: annatisch <8689453+annatisch@users.noreply.github.com> * Re-record tests * Remove extra project reference * Re-record tests * Re-record tests * Restructure packaging * Refactored aspire module to single file * Generate to .modules * Generate modules before installing * Support conditional ref expr * Remove additionalArgs * Tests * Renames to prevent naming conflicts * Group similar overloads * Support param defaults * Update Python codegen snapshots Accept regenerated Python snapshots after the cancellation token and process timeout fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix polyglot and CLI template validation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add Python polyglot playground validation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Skip unsupported Python SDK playgrounds Exclude Azure.Sql, Foundry, and Maui from Python polyglot playground validation until Python code generation supports their current API surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Python codegen naming conflicts Sanitize Python identifiers derived from capability parameters and derive generic Python type names without leaking CLR assembly metadata so the Python playground validation can cover Azure.Sql, Foundry, and Maui again. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refresh Python playground apphosts Remove the stale .modules sys.path bootstrap from the generated Python playground ValidationAppHosts so they match the shared Python scaffold, and add a regression test to keep new scaffolds importing aspire_app directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove Python scaffold assertion test Drop the implementation-shaped Python scaffold test and rely on the existing generated-output verification for this area. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add PythonAppHost playground Create a Python AppHost playground that orchestrates a Redis cache, a Uvicorn-hosted Python app, and a Vite frontend that references the Python service. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update Python codegen snapshot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Java validation selection Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix describe replica test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Sebastien Ros <sebastienros@gmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PythonLanguageSupportused<inheritdoc />placeholders on all public members, which provides no IntelliSense context beyond the interface contract. This replaces them with explicit, Python-specific XML documentation.Changes
<summary>with a<remarks>section describing theuv-based dependency/runtime workflowLanguage– explicit<summary>+<value>noting the"python"identifierScaffold–<summary>,<param>,<returns>, and<remarks>covering the four generated files (apphost.py,requirements.txt,uv-install.py,apphost.run.json) and deterministic port seeding viaPortSeedDetect–<summary>,<param>,<returns>documenting the two-file (apphost.py+requirements.txt) detection requirementGetRuntimeSpec–<summary>,<returns>,<remarks>noting the platform-specific Python binary probing (python/pyon Windows,python3/pythonelsewhere)Checklist
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.