From 95de711869ca0ef39930f80d38616a276f0e8a08 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Wed, 16 Oct 2024 10:15:58 -0700 Subject: [PATCH] Mark Aspire.Hosting.Python as experimental Fixes #6298 --- src/Aspire.Hosting.Python/Directory.Build.props | 9 +++++++++ src/Aspire.Hosting.Python/PythonAppResource.cs | 4 ++-- .../PythonAppResourceBuilderExtensions.cs | 10 +++++----- .../PythonProjectResourceBuilderExtensions.cs | 4 ++-- 4 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 src/Aspire.Hosting.Python/Directory.Build.props diff --git a/src/Aspire.Hosting.Python/Directory.Build.props b/src/Aspire.Hosting.Python/Directory.Build.props new file mode 100644 index 00000000000..312f0916884 --- /dev/null +++ b/src/Aspire.Hosting.Python/Directory.Build.props @@ -0,0 +1,9 @@ + + + + + true + + + + diff --git a/src/Aspire.Hosting.Python/PythonAppResource.cs b/src/Aspire.Hosting.Python/PythonAppResource.cs index 86e11579d08..6313ba18d7b 100644 --- a/src/Aspire.Hosting.Python/PythonAppResource.cs +++ b/src/Aspire.Hosting.Python/PythonAppResource.cs @@ -8,7 +8,7 @@ namespace Aspire.Hosting.Python; /// -/// A resource that represents a python executible or app. +/// A resource that represents a python executable or app. /// /// The name of the resource. /// The path to the executable used to run the python app. @@ -18,4 +18,4 @@ public class PythonAppResource(string name, string executablePath, string projec { private static string ThrowIfNull([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) => argument ?? throw new ArgumentNullException(paramName); -} \ No newline at end of file +} diff --git a/src/Aspire.Hosting.Python/PythonAppResourceBuilderExtensions.cs b/src/Aspire.Hosting.Python/PythonAppResourceBuilderExtensions.cs index b726fff4777..f4b666ed47e 100644 --- a/src/Aspire.Hosting.Python/PythonAppResourceBuilderExtensions.cs +++ b/src/Aspire.Hosting.Python/PythonAppResourceBuilderExtensions.cs @@ -44,8 +44,8 @@ public static class PythonAppResourceBuilderExtensions /// /// /// - /// Add a python app or executible to the application model. In this example the python code entry point is located in the PythonProject directory - /// if this path is relative then it is assumed to be relative to the AppHost directory, and the virtual enviroment path if relative + /// Add a python app or executable to the application model. In this example the python code entry point is located in the PythonProject directory + /// if this path is relative then it is assumed to be relative to the AppHost directory, and the virtual environment path if relative /// is relative to the project directory. In the example below, if the app host directory is $HOME/repos/MyApp/src/MyApp.AppHost then /// the ProjectPath would be $HOME/repos/MyApp/src/MyApp.AppHost/PythonProject and the virtual environment path (defaulted) would /// be $HOME/repos/MyApp/src/MyApp.AppHost/PythonProject/.venv. @@ -93,8 +93,8 @@ public static IResourceBuilder AddPythonApp( /// /// /// - /// Add a python app or executible to the application model. In this example the python code is located in the PythonProject directory - /// if this path is relative then it is assumed to be relative to the AppHost directory, and the virtual enviroment path if relative + /// Add a python app or executable to the application model. In this example the python code is located in the PythonProject directory + /// if this path is relative then it is assumed to be relative to the AppHost directory, and the virtual environment path if relative /// is relative to the project directory. In the example below, if the app host directory is $HOME/repos/MyApp/src/MyApp.AppHost then /// the ProjectPath would be $HOME/repos/MyApp/src/MyApp.AppHost/PythonProject and the virtual environment path (defaulted) would /// be $HOME/repos/MyApp/src/MyApp.AppHost/PythonProject/.venv. @@ -177,4 +177,4 @@ private static void AddOpenTelemetryArguments(CommandLineArgsCallbackContext con context.Args.Add("--metrics_exporter"); context.Args.Add("otlp"); } -} \ No newline at end of file +} diff --git a/src/Aspire.Hosting.Python/PythonProjectResourceBuilderExtensions.cs b/src/Aspire.Hosting.Python/PythonProjectResourceBuilderExtensions.cs index 561c4f9d288..d6a45fbc664 100644 --- a/src/Aspire.Hosting.Python/PythonProjectResourceBuilderExtensions.cs +++ b/src/Aspire.Hosting.Python/PythonProjectResourceBuilderExtensions.cs @@ -46,7 +46,7 @@ public static class PythonProjectResourceBuilderExtensions /// /// /// Add a python project to the application model. In this example the project is located in the PythonProject directory - /// if this path is relative then it is assumed to be relative to the AppHost directory, and the virtual enviroment path if relative + /// if this path is relative then it is assumed to be relative to the AppHost directory, and the virtual environment path if relative /// is relative to the project directory. In the example below, if the app host directory is $HOME/repos/MyApp/src/MyApp.AppHost then /// the ProjectPath would be $HOME/repos/MyApp/src/MyApp.AppHost/PythonProject and the virtual environment path (defaulted) would /// be $HOME/repos/MyApp/src/MyApp.AppHost/PythonProject/.venv. @@ -96,7 +96,7 @@ public static IResourceBuilder AddPythonProject( /// /// /// Add a python project to the application model. In this example the project is located in the PythonProject directory - /// if this path is relative then it is assumed to be relative to the AppHost directory, and the virtual enviroment path if relative + /// if this path is relative then it is assumed to be relative to the AppHost directory, and the virtual environment path if relative /// is relative to the project directory. In the example below, if the app host directory is $HOME/repos/MyApp/src/MyApp.AppHost then /// the ProjectPath would be $HOME/repos/MyApp/src/MyApp.AppHost/PythonProject and the virtual environment path (defaulted) would /// be $HOME/repos/MyApp/src/MyApp.AppHost/PythonProject/.venv.