43 references to EntrypointType
Aspire.Hosting.Python (32)
PythonAppResourceBuilderExtensions.cs (31)
58
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder);
89
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder);
120
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Module, moduleName, DefaultVirtualEnvFolder);
151
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Executable, executableName, DefaultVirtualEnvFolder);
188
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
230
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, virtualEnvironmentPath)
235
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
311
if (entrypointType is
EntrypointType
.Script or
EntrypointType
.Module)
313
var programPath = entrypointType ==
EntrypointType
.Script
321
Module = entrypointType ==
EntrypointType
.Module ? entrypoint : null,
335
if (annotation.Type ==
EntrypointType
.Module)
346
else if (annotation.Type ==
EntrypointType
.Script)
389
var
entrypointType = entrypointAnnotation.Type;
395
EntrypointType
.Script => ["python", entrypoint],
396
EntrypointType
.Module => ["python", "-m", entrypoint],
397
EntrypointType
.Executable => [entrypoint],
453
case
EntrypointType
.Script:
456
case
EntrypointType
.Module:
459
case
EntrypointType
.Executable:
532
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint),
533
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
577
this IResourceBuilder<PythonAppResource> builder,
EntrypointType
entrypointType, string entrypoint)
594
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypoint),
595
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
618
var
entrypointType = existingAnnotation.Type;
624
case
EntrypointType
.Module:
628
case
EntrypointType
.Script:
631
case
EntrypointType
.Executable:
PythonEntrypointAnnotation.cs (1)
16
public required
EntrypointType
Type { get; set; }
Aspire.Hosting.Python.Tests (11)
AddPythonAppTests.cs (11)
213
Assert.Equal(
EntrypointType
.Script, entrypointAnnotation.Type);
621
Assert.Equal(
EntrypointType
.Script, entrypointAnnotation.Type);
640
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
659
Assert.Equal(
EntrypointType
.Executable, entrypointAnnotation.Type);
844
pythonBuilder.WithEntrypoint(
EntrypointType
.Module, "uvicorn")
854
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
880
pythonBuilder.WithEntrypoint(
EntrypointType
.Executable, "pytest");
899
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, "flask"));
910
builder.WithEntrypoint(
EntrypointType
.Module, "flask"));
924
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, null!));
928
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, string.Empty));