Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 17, 2025

Draft PR to address issue #5151: Python Templates and Onboarding Documentation

This PR creates comprehensive documentation for Python developers using Aspire, covering two main scenarios:

  • Review existing Python documentation and understand current state
  • Create new article for Aspire Python template (aspire-py-starter)
    • Document prerequisites and setup
    • Show how to create a new Python+JavaScript project using the template
    • Include guidance for when template becomes available
    • Add telemetry and observability guidance
    • Align Python version requirements across documents
    • Use Aspire CLI instead of dotnetcli commands
    • Fix template structure (file-based with apphost.cs, no ServiceDefaults)
    • Add links to FastAPI, React, Flask, Django, and Vite
    • Use complete sentences with proper punctuation in all lists
    • Remove duplicate sections
    • Add Aspire CLI installation prerequisite
    • Add interactive steps for template creation
    • Update to use AddUvicornApp instead of AddPythonScript
  • Enhance existing onboarding documentation for existing Python apps
    • Clarify the distinction between using templates vs onboarding existing apps
    • Add migration tips section
    • Include common pitfalls and troubleshooting
    • Add guidance for multiple Python services
    • Add Flask link to description
    • Add Aspire CLI installation prerequisite
    • Update Summary to remove AppHost project creation
    • Add periods to all list items
    • Convert remaining .NET CLI commands to Aspire CLI (lines 31, 48, 137, 156)
    • Replace simple CLI commands with interactive step-by-step instructions
  • Update TOC to include new documentation
  • Update templates documentation to mention Python template
    • Add Redis cache mention
    • Fix grammar and add missing articles
    • Restore .NET CLI usage for framework targeting
  • Add appropriate cross-references between documents
  • Validate documentation with markdownlint
  • Address all code review feedback from @alistairmatthews
  • Review and finalize

Changes made:

  1. Created build-aspire-python-app.md - New article for using the aspire-py-starter template
  2. Updated build-aspire-apps-with-python.md - Enhanced with onboarding guidance for existing apps
  3. Updated aspire-sdk-templates.md - Added Python template with correct structure and Aspire CLI commands
  4. Updated toc.yml - Reorganized Python documentation with nested items
  5. Fixed Python version requirement consistency (3.12 or later)
  6. Updated to use Aspire CLI (aspire new, aspire run) instead of dotnetcli
  7. Corrected template structure to match actual implementation (file-based AppHost, app and frontend folders, no ServiceDefaults)
  8. Added links to FastAPI, React, Flask, Django, and Vite documentation
  9. Fixed all lists to have complete sentences with proper punctuation
  10. Removed duplicate sections
  11. Applied all suggestions from @alistairmatthews review
  12. Converted remaining .NET CLI commands to Aspire CLI equivalents where appropriate
  13. Replaced simple CLI commands with detailed interactive step-by-step instructions for better user experience
Original prompt

Please create a draft PR to address issue @dotnet/docs-aspire/issues/5151 - and there's a link within the issue description that should be used to help inform you along the way.


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


Internal previews

📄 File 🔗 Preview link
docs/fundamentals/aspire-sdk-templates.md Aspire templates
docs/get-started/build-aspire-apps-with-python.md Orchestrate Python apps in Aspire
docs/get-started/build-aspire-python-app.md Build an Aspire app with Python and JavaScript
docs/toc.yml docs/toc

Copilot AI changed the title [WIP] Fix issue with documentation in ASP.NET Add Python templates and onboarding documentation Oct 17, 2025
Copilot finished work on behalf of IEvangelist October 17, 2025 14:41
Copilot AI requested a review from IEvangelist October 17, 2025 14:41
Copy link
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

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

Hmmm... this is an okay start, but we really need to pivot. We're trying to avoid dotnetcli commands and instead directing users to use the Aspire CLI. Also, all lists need to have complete sentences and proper punctuation.

@IEvangelist
Copy link
Member

Hey @copilot please address all feedback

@davidfowl
Copy link
Member

This is going to be in sync with the new python integration and assets right?

dotnet new aspire-starter
```

To create an Aspire app with a Python backend and JavaScript frontend:
Copy link
Member

Choose a reason for hiding this comment

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

This should be using aspire new not dotnet new

Copy link
Member

Choose a reason for hiding this comment

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

I know, I have it going to work... see #5304 (review)

Copy link
Contributor Author

Copilot AI commented Oct 21, 2025

Hmmm... this is an okay start, but we really need to pivot. We're trying to avoid dotnetcli commands and instead directing users to use the Aspire CLI. Also, all lists need to have complete sentence...

Fixed in commit 70d2439. Updated all dotnetcli commands to use Aspire CLI (aspire new, aspire run) and ensured all lists have complete sentences with proper punctuation.

Hey @copilot please address all feedback

All feedback addressed in commit 70d2439:

  • Changed from dotnetcli to Aspire CLI commands
  • Fixed template structure to match actual implementation (file-based, no ServiceDefaults)
  • Added links to FastAPI and React
  • Fixed all lists to have complete sentences with proper punctuation

Copilot AI requested a review from IEvangelist October 21, 2025 15:54
Copilot finished work on behalf of IEvangelist October 21, 2025 15:54
@alistairmatthews alistairmatthews self-requested a review October 28, 2025 10:21
Copy link
Contributor

@alistairmatthews alistairmatthews left a comment

Choose a reason for hiding this comment

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

@copilot please action all my comments and suggestions.

Copy link
Contributor Author

Copilot AI commented Oct 28, 2025

@copilot please action all my comments and suggestions.

All suggestions applied in commit 718554a:

  • Updated grammar and added missing articles
  • Added links to Flask, Django, and Vite
  • Added Aspire CLI installation prerequisite to both articles
  • Added periods to all list items
  • Updated Summary section to remove AppHost project creation
  • Fixed .NET CLI usage for framework targeting
  • Added Redis cache mention in template description
  • Added interactive steps for template creation
  • Updated to use AddUvicornApp instead of AddPythonScript

Copilot finished work on behalf of alistairmatthews October 28, 2025 16:12
@alistairmatthews
Copy link
Contributor

@copilot Please change the .NET CLI commands on the follow lines of the file build-aspire-apps-with-python.md to their Aspire CLI equivalent:

  • Line 31
  • Line 48
  • Line 137
  • Line 156

Do not change the .NET CLI command on line 192 - the Aspire CLI doesn't support specifying a launch profile, which is required, so we must stick with the existing command.

Copy link
Contributor Author

Copilot AI commented Oct 29, 2025

@copilot Please change the .NET CLI commands on the follow lines of the file build-aspire-apps-with-python.md to their Aspire CLI equivalent:

  • Line 31
    ...

Fixed in commit. Changed .NET CLI commands to Aspire CLI equivalents on:

  • Line 31: dotnet new aspireaspire new aspire
  • Line 48: dotnet run --project ...aspire run
  • Line 137: Simplified to dotnet add package (removed project path)
  • Line 156: dotnet run --project ...aspire run

Line 192 kept as-is per your instructions (--launch-profile required).

Copilot finished work on behalf of alistairmatthews October 29, 2025 11:11
Copy link
Contributor

@alistairmatthews alistairmatthews left a comment

Choose a reason for hiding this comment

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

@copilot please integrate my suggestions.

Copy link
Contributor Author

Copilot AI commented Oct 29, 2025

@copilot please integrate my suggestions.

Applied all suggestions. Replaced simple CLI commands with interactive step-by-step instructions:

  • Template creation now uses aspire new with detailed interactive steps
  • Package installation now uses aspire add with guidance for selecting the Python hosting integration

All changes validated with markdownlint.

Copilot finished work on behalf of alistairmatthews October 29, 2025 11:26
@alistairmatthews
Copy link
Contributor

Closing and reopening to trigger a build.

@alistairmatthews
Copy link
Contributor

Closing and reopening a second time to try and resolve the OPS status checker fail.

@alistairmatthews alistairmatthews marked this pull request as ready for review October 30, 2025 12:18

This tutorial also assumes that you have installed the Aspire CLI. For further instructions, see [Install Aspire CLI](../cli/install.md).

This tutorial also assumes that you have installed the Aspire CLI. For further instructions, see [Install Aspire CLI](../cli/install.md).
Copy link
Member

Choose a reason for hiding this comment

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

This is a dupe?

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.

4 participants