1 type derived from PythonAppResource
Aspire.Hosting.Python (1)
UvicornAppResource.cs (1)
28
:
PythonAppResource
(name, executablePath, appDirectory)
5 instantiations of PythonAppResource
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
340
virtualEnvironmentPath, (n, e, d) => new
PythonAppResource
(n, e, d));
Aspire.Hosting.Python.Tests (4)
AddPythonAppTests.cs (1)
1236
var resource = new
PythonAppResource
("test", "python", "/tmp");
PythonPublicApiTests.cs (3)
21
var action = () => new
PythonAppResource
(name, executablePath, appDirectory);
38
var action = () => new
PythonAppResource
(name, executablePath, appDirectory);
52
var action = () => new
PythonAppResource
(name, executablePath, appDirectory: null!);
88 references to PythonAppResource
Aspire.Hosting.Python (29)
PythonAppResourceBuilderExtensions.cs (27)
67
public static IResourceBuilder<
PythonAppResource
> AddPythonApp(
105
public static IResourceBuilder<
PythonAppResource
> AddPythonModule(
146
public static IResourceBuilder<
PythonAppResource
> AddPythonExecutable(
180
public static IResourceBuilder<
PythonAppResource
> AddPythonApp(
222
public static IResourceBuilder<
PythonAppResource
> AddPythonApp(
335
private static IResourceBuilder<
PythonAppResource
> AddPythonAppCore(
345
string entrypoint, string virtualEnvironmentPath, Func<string, string, string, T> createResource) where T :
PythonAppResource
549
PythonAppResource
resource, ContainerResource containerResource, EntrypointType declaredType, string declaredEntrypoint)
587
private static void GenerateUvDockerfile(DockerfileBuilderCallbackContext context,
PythonAppResource
resource,
647
var logger = context.Services.GetService<ILogger<
PythonAppResource
>>();
692
private static void GenerateFallbackDockerfile(DockerfileBuilderCallbackContext context,
PythonAppResource
resource,
703
var logger = context.Services.GetService<ILogger<
PythonAppResource
>>();
923
this IResourceBuilder<T> builder, string virtualEnvironmentPath, bool createIfNotExists = true) where T :
PythonAppResource
984
this IResourceBuilder<T> builder) where T :
PythonAppResource
1096
this IResourceBuilder<T> builder, EntrypointType entrypointType, string entrypoint) where T :
PythonAppResource
1164
/// <typeparam name="T">The type of the Python application resource, must derive from <see cref="
PythonAppResource
"/>.</typeparam>
1196
where T :
PythonAppResource
1247
/// <typeparam name="T">The type of the Python application resource, must derive from <see cref="
PythonAppResource
"/>.</typeparam>
1294
where T :
PythonAppResource
1353
private static void AddInstaller<T>(IResourceBuilder<T> builder, bool install) where T :
PythonAppResource
1421
private static void CreateVenvCreatorIfNeeded<T>(IResourceBuilder<T> builder) where T :
PythonAppResource
1477
private static void RemoveVenvCreator<T>(IResourceBuilder<T> builder) where T :
PythonAppResource
1489
private static void SetupDependencies(IDistributedApplicationBuilder builder,
PythonAppResource
resource)
1502
builder.TryCreateResourceBuilder<
PythonAppResource
>(resource.Name, out var appBuilder);
1546
private static bool ShouldCreateVenv<T>(IResourceBuilder<T> builder) where T :
PythonAppResource
1584
internal static IResourceBuilder<
PythonAppResource
> WithPythonEnvironment(this IResourceBuilder<
PythonAppResource
> builder, Action<PythonEnvironmentAnnotation> configure)
PythonInstallerResource.cs (1)
13
internal sealed class PythonInstallerResource(string name,
PythonAppResource
parent)
PythonVenvCreatorResource.cs (1)
14
internal sealed class PythonVenvCreatorResource(string name,
PythonAppResource
parent, string venvPath)
Aspire.Hosting.Python.Tests (59)
AddPythonAppTests.cs (59)
162
var
pythonProjectResource = executableResources.OfType<
PythonAppResource
>().Single();
201
var
pythonProjectResource = executableResources.OfType<
PythonAppResource
>().Single();
220
var
resource = appModel.Resources.OfType<
PythonAppResource
>().Single();
244
var
pythonProjectResource = executableResources.OfType<
PythonAppResource
>().Single();
451
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
484
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
502
IResourceBuilder<
PythonAppResource
> builder = null!;
545
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
576
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
612
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
661
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
696
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
739
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
826
var
pythonAppResource = appModel.Resources.OfType<
PythonAppResource
>().Single();
838
IResourceBuilder<
PythonAppResource
> builder = null!;
962
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
981
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
1000
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
1022
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
1058
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
1092
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
1123
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
1147
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
1169
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
1195
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
1236
var
resource = new PythonAppResource("test", "python", "/tmp");
1248
IResourceBuilder<
PythonAppResource
> builder = null!;
1727
var
resource = pythonApp.Resource;
1771
var
resource = pythonApp.Resource;
1811
var
resource = pythonApp.Resource;
1983
var
resource = pythonApp.Resource;
2014
var
resource = pythonApp.Resource;
2817
var
pythonAppResource = appModel.Resources.OfType<
PythonAppResource
>().Single();
2850
var
pythonAppResource = appModel.Resources.OfType<
PythonAppResource
>().Single();