Skip to content

Add comprehensive XML documentation to PythonLanguageSupport public API#14744

Merged
annatisch merged 2 commits into
pythonapphostfrom
copilot/sub-pr-13947-again
Feb 26, 2026
Merged

Add comprehensive XML documentation to PythonLanguageSupport public API#14744
annatisch merged 2 commits into
pythonapphostfrom
copilot/sub-pr-13947-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 26, 2026

Description

PythonLanguageSupport used <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

  • Class – expanded <summary> with a <remarks> section describing the uv-based dependency/runtime workflow
  • Language – explicit <summary> + <value> noting the "python" identifier
  • Scaffold<summary>, <param>, <returns>, and <remarks> covering the four generated files (apphost.py, requirements.txt, uv-install.py, apphost.run.json) and deterministic port seeding via PortSeed
  • Detect<summary>, <param>, <returns> documenting the two-file (apphost.py + requirements.txt) detection requirement
  • GetRuntimeSpec<summary>, <returns>, <remarks> noting the platform-specific Python binary probing (python/py on Windows, python3/python elsewhere)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

🔒 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.

…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
Copilot AI requested a review from annatisch February 26, 2026 20:30
@annatisch annatisch marked this pull request as ready for review February 26, 2026 21:36
@annatisch annatisch merged commit 2bc96e2 into pythonapphost Feb 26, 2026
2 of 3 checks passed
@annatisch annatisch deleted the copilot/sub-pr-13947-again branch February 26, 2026 21:38
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>
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants