CommunityToolkit / Aspire

A community project with additional components and extensions for .NET Aspire
MIT License
218 stars 27 forks source link

Add Uvicorn Integration #219

Closed tommasodotNET closed 1 week ago

tommasodotNET commented 1 week ago

*Closes #207

Adds Uvicorn integration. The logic is the same as for official Python integration but it uses uvicorn to run the app.

var uvicorn = builder.AddUvicornApp("uvicornapp", "../uvicornapp-api", "main:app")
    .WithHttpEndpoint(env: "UVICORN_PORT");

PR Checklist

tommasodotNET commented 1 week ago

I agree. Maybe we should structure this as we did with NodeJS Extensions. Especially considering we also have this #221

aaronpowell commented 1 week ago

I agree. Maybe we should structure this as we did with NodeJS Extensions. Especially considering we also have this #221

That's exactly where my thinking was going 😉

aaronpowell commented 1 week ago

@tommasodotNET I'm working on using the PythonAppResource as the base type, but it's marked as experimental (https://learn.microsoft.com/en-gb/dotnet/aspire/diagnostics/overview#ASPIREHOSTINGPYTHON001) so we'll have to use that too.

github-actions[bot] commented 1 week ago

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 100% 100% 6 ✔
CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps 100% 100% 28 ✔
CommunityToolkit.Aspire.Hosting.Deno 84% 75% 72 ✔
CommunityToolkit.Aspire.Hosting.Golang 94% 50% 16 ✔
CommunityToolkit.Aspire.Hosting.Java 98% 71% 58 ✔
CommunityToolkit.Aspire.Hosting.Meilisearch 61% 27% 94 âž–
CommunityToolkit.Aspire.Hosting.NodeJS.Extensions 90% 68% 92 ✔
CommunityToolkit.Aspire.Hosting.Ollama 64% 60% 222 âž–
CommunityToolkit.Aspire.Hosting.Python.Extensions 67% 46% 56 âž–
CommunityToolkit.Aspire.Hosting.Rust 94% 83% 16 ✔
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 69% 60% 50 âž–
CommunityToolkit.Aspire.Meilisearch 97% 92% 68 ✔
CommunityToolkit.Aspire.OllamaSharp 84% 77% 76 ✔
Summary 77% (1666 / 2166) 62% (411 / 660) 854 âž–

Minimum allowed line rate is 60%