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)
355
virtualEnvironmentPath, (n, e, d) => new
PythonAppResource
(n, e, d));
Aspire.Hosting.Python.Tests (4)
AddPythonAppTests.cs (1)
1193
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!);
87 references to PythonAppResource
Aspire.Hosting.Python (28)
PythonAppResourceBuilderExtensions.cs (26)
66
public static IResourceBuilder<
PythonAppResource
> AddPythonApp(
101
public static IResourceBuilder<
PythonAppResource
> AddPythonModule(
139
public static IResourceBuilder<
PythonAppResource
> AddPythonExecutable(
173
public static IResourceBuilder<
PythonAppResource
> AddPythonApp(
215
public static IResourceBuilder<
PythonAppResource
> AddPythonApp(
350
private static IResourceBuilder<
PythonAppResource
> AddPythonAppCore(
360
string entrypoint, string virtualEnvironmentPath, Func<string, string, string, T> createResource) where T :
PythonAppResource
544
private static void GenerateUvDockerfile(DockerfileBuilderCallbackContext context,
PythonAppResource
resource,
604
var logger = context.Services.GetService<ILogger<
PythonAppResource
>>();
649
private static void GenerateFallbackDockerfile(DockerfileBuilderCallbackContext context,
PythonAppResource
resource,
660
var logger = context.Services.GetService<ILogger<
PythonAppResource
>>();
878
this IResourceBuilder<T> builder, string virtualEnvironmentPath, bool createIfNotExists = true) where T :
PythonAppResource
937
this IResourceBuilder<T> builder) where T :
PythonAppResource
1065
this IResourceBuilder<T> builder, EntrypointType entrypointType, string entrypoint) where T :
PythonAppResource
1131
/// <typeparam name="T">The type of the Python application resource, must derive from <see cref="
PythonAppResource
"/>.</typeparam>
1161
where T :
PythonAppResource
1212
/// <typeparam name="T">The type of the Python application resource, must derive from <see cref="
PythonAppResource
"/>.</typeparam>
1257
where T :
PythonAppResource
1319
private static void AddInstaller<T>(IResourceBuilder<T> builder, bool install) where T :
PythonAppResource
1393
private static void CreateVenvCreatorIfNeeded<T>(IResourceBuilder<T> builder) where T :
PythonAppResource
1453
private static void RemoveVenvCreator<T>(IResourceBuilder<T> builder) where T :
PythonAppResource
1465
private static void SetupDependencies(IDistributedApplicationBuilder builder,
PythonAppResource
resource)
1478
builder.TryCreateResourceBuilder<
PythonAppResource
>(resource.Name, out var appBuilder);
1522
private static bool ShouldCreateVenv<T>(IResourceBuilder<T> builder) where T :
PythonAppResource
1560
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)
159
var
pythonProjectResource = executableResources.OfType<
PythonAppResource
>().Single();
198
var
pythonProjectResource = executableResources.OfType<
PythonAppResource
>().Single();
217
var
resource = appModel.Resources.OfType<
PythonAppResource
>().Single();
241
var
pythonProjectResource = executableResources.OfType<
PythonAppResource
>().Single();
417
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
450
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
468
IResourceBuilder<
PythonAppResource
> builder = null!;
511
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
541
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
574
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
619
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
653
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
692
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
779
var
pythonAppResource = appModel.Resources.OfType<
PythonAppResource
>().Single();
791
IResourceBuilder<
PythonAppResource
> builder = null!;
915
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
934
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
953
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
975
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
1011
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
1045
var
pythonProjectResource = Assert.Single(executableResources.OfType<
PythonAppResource
>());
1076
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
1100
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
1122
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
1148
var
resource = Assert.Single(appModel.Resources.OfType<
PythonAppResource
>());
1193
var
resource = new PythonAppResource("test", "python", "/tmp");
1205
IResourceBuilder<
PythonAppResource
> builder = null!;
1398
var
resource = pythonApp.Resource;
1436
var
resource = pythonApp.Resource;
1476
var
resource = pythonApp.Resource;
1513
var
resource = pythonApp.Resource;
1544
var
resource = pythonApp.Resource;
2342
var
pythonAppResource = appModel.Resources.OfType<
PythonAppResource
>().Single();
2375
var
pythonAppResource = appModel.Resources.OfType<
PythonAppResource
>().Single();