-
Notifications
You must be signed in to change notification settings - Fork 699
Add XML Documentation Standards and Apply Improvements to Aspire.Hosting.Python #11947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: mitchdenny <[email protected]>
Co-authored-by: mitchdenny <[email protected]>
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11947 Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11947" |
@copilot Remove the report and instead apply the instructions to the Aspire.Hosting.Python package in src/Aspire.Hosting.Python. Do a comprehensive review of all of the public API surface in that package and include suggested changes to the source files in this PR for review. |
…pire.Hosting.Python Co-authored-by: mitchdenny <[email protected]>
Removed the analysis report and applied comprehensive XML documentation improvements to all public APIs in the Changes made:
Validation: Commit: f8818f2 → [new commit] |
@IEvangelist I'm having a go at providing some specific instructions to improve consistency and quality of our XML docs. One of the quirks of our API surface is that with have Interested on your inputs on this prompt/instructions as well in terms of anything you think we need to cover off to help the agent narrow in on ideal docs. |
@copilot Do not document internal APIs with this verbosity only public ones. Make sure the instructions state that. |
Co-authored-by: davidfowl <[email protected]>
Simplified internal API documentation to be brief and concise, keeping verbose documentation only for public APIs. Updated the XML documentation standards to explicitly state this distinction. Changes:
Commit: 6649c43 → [new commit] |
/// </para> | ||
/// <para> | ||
/// This resource supports various Python execution environments including: | ||
/// - System Python installations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot XML doc comment are not markdown, so this list of items will not render correctly. You need to create lists using XML like this (for a bulleted list)
<list type="bullet">
<item>Item 1</item>
<item>Item 1</item>
</list>
Or this (for a none bulleted list):
<list>
<item>Item 1</item>
<item>Item 1</item>
</list>
Update the docs that you have created to use this formatting where you have a list and add a section to xmldocs instructions on how lists should be formatted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converted all markdown-style lists to proper XML <list>
tags and added comprehensive list formatting guidance to the XML documentation standards.
Changes:
- Fixed lists in
PythonAppResource.cs
(remarks and parameter sections) - Added
<list>
tag documentation section with examples for bulleted, numbered, and term/description lists - Added DON'T example showing markdown lists are incorrect in XML docs
Commit: 1e886d0 → [new commit]
Co-authored-by: mitchdenny <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR establishes comprehensive XML documentation standards for the Aspire repository and demonstrates their application to the Python hosting package. The standards differentiate between public APIs requiring comprehensive documentation and internal APIs needing only minimal documentation. Key improvements include adding a complete XML documentation guide and enhancing documentation quality for public APIs in Aspire.Hosting.Python.
Key changes:
- Created detailed XML documentation standards with templates and best practices
- Applied comprehensive documentation improvements to public APIs in Aspire.Hosting.Python
- Added clear guidelines distinguishing public vs internal API documentation requirements
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
.github/instructions/xmldoc.instructions.md |
New comprehensive XML documentation standards guide with templates, best practices, and Aspire-specific patterns |
src/Aspire.Hosting.Python/PythonAppResource.cs |
Enhanced class documentation with detailed remarks, examples, and proper XML list formatting for public API |
src/Aspire.Hosting.Python/PythonAppResourceBuilderExtensions.cs |
Improved documentation for WithVirtualEnvironment() and WithUvEnvironment() methods with comprehensive remarks and examples |
src/Aspire.Hosting.Python/AssemblyInfo.cs |
Added informative comments about experimental status and suppression guidance |
/// specified in pyproject.toml are installed. | ||
/// UV (https://github.com/astral-sh/uv) is a modern Python package manager written in Rust that can manage virtual environments | ||
/// and dependencies with significantly faster performance than traditional tools. The <c>uv sync</c> command ensures that the virtual | ||
/// environment exists and all dependencies specified in pyproject.toml are installed and synchronized. |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line is split incorrectly, causing 'synchronized' to appear on a separate line. This should be properly wrapped or kept on the same line.
Copilot uses AI. Check for mistakes.
/// and dependencies with significantly faster performance than traditional tools. The <c>uv sync</c> command ensures that the virtual | ||
/// environment exists and all dependencies specified in pyproject.toml are installed and synchronized. |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line break in the middle of a sentence creates awkward formatting. Consider rewrapping these lines to maintain proper sentence flow within the XML documentation.
/// and dependencies with significantly faster performance than traditional tools. The <c>uv sync</c> command ensures that the virtual | |
/// environment exists and all dependencies specified in pyproject.toml are installed and synchronized. | |
/// and dependencies with significantly faster performance than traditional tools. The <c>uv sync</c> command ensures that the virtual environment exists and all dependencies specified in pyproject.toml are installed and synchronized. |
Copilot uses AI. Check for mistakes.
Overview
This PR adds comprehensive XML documentation guidelines and applies them to the
Aspire.Hosting.Python
package, demonstrating high-quality API documentation standards for the Aspire repository.What's Included
1. XML Documentation Standards (
.github/instructions/xmldoc.instructions.md
)A comprehensive guide providing:
<list>
tags with examples for bulleted, numbered, and term/description listsThis file follows the repository's instruction pattern with frontmatter (
applyTo: "src/**/*.cs"
) and will be automatically picked up by GitHub Copilot to guide developers when writing documentation.2. Applied Documentation Improvements to Aspire.Hosting.Python
Comprehensive XML documentation enhancements applied to public APIs only in the
src/Aspire.Hosting.Python
package:PythonAppResource.cs (public)
PythonAppResourceBuilderExtensions.cs (public)
AddPythonApp()
- Already well-documented with comprehensive remarks and examples (preserved)WithVirtualEnvironment()
- Added detailed usage context, remarks about virtual environment best practices, and practical exampleWithUvEnvironment()
- Expanded documentation about UV package manager, added idempotent behavior notes, exception documentation, and practical exampleVirtualEnvironment.cs (internal)
PythonUvEnvironmentResource.cs (internal)
PythonAppLaunchConfiguration.cs (internal)
AssemblyInfo.cs
Documentation Patterns Applied
For Public APIs:
<summary>
tags explaining purpose and context<remarks>
sections with usage guidance and best practices<example>
sections showing real-world usage patterns<param>
descriptions with concrete examples<returns>
descriptions for method chaining<exception>
documentation where applicable<see cref="">
tags<list>
tags instead of markdown-style listsFor Internal APIs:
<summary>
tags only<remarks>
sections<example>
sectionsExample Improvement
Before:
After:
Impact
Build Validation
✅ Successfully built
Aspire.Hosting.Python.csproj
with no errors or warningsCreated from VS Code via the GitHub Pull Request extension.
Original prompt
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.