62 references to EntrypointType
Aspire.Hosting.Python (33)
PythonAppResourceBuilderExtensions.cs (32)
69
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
107
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Module, moduleName, DefaultVirtualEnvFolder)
148
=> AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Executable, executableName, DefaultVirtualEnvFolder);
185
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, DefaultVirtualEnvFolder)
228
return AddPythonAppCore(builder, name, appDirectory,
EntrypointType
.Script, scriptPath, virtualEnvironmentPath)
277
EntrypointType
.Executable,
336
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
344
IDistributedApplicationBuilder builder, string name, string appDirectory,
EntrypointType
entrypointType,
461
var
entrypointType = entrypointAnnotation.Type;
549
PythonAppResource resource, ContainerResource containerResource,
EntrypointType
declaredType, string declaredEntrypoint)
565
(declaredType ==
EntrypointType
.Script &&
588
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
680
case
EntrypointType
.Script:
683
case
EntrypointType
.Module:
686
case
EntrypointType
.Executable:
693
string pythonVersion,
EntrypointType
entrypointType, string entrypoint)
780
case
EntrypointType
.Script:
783
case
EntrypointType
.Module:
786
case
EntrypointType
.Executable:
944
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint),
945
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
997
var
entrypointType = entrypointAnnotation.Type;
1009
if (entrypointType ==
EntrypointType
.Script)
1096
this IResourceBuilder<T> builder,
EntrypointType
entrypointType, string entrypoint) where T : PythonAppResource
1113
EntrypointType
.Executable => virtualEnvironment.GetExecutable(entrypoint),
1114
EntrypointType
.Script or
EntrypointType
.Module => virtualEnvironment.GetExecutable("python"),
1138
var
entrypointType = existingAnnotation.Type;
1144
case
EntrypointType
.Module:
1148
case
EntrypointType
.Script:
1151
case
EntrypointType
.Executable:
PythonEntrypointAnnotation.cs (1)
16
public required
EntrypointType
Type { get; set; }
Aspire.Hosting.Python.Tests (28)
AddPythonAppTests.cs (28)
222
Assert.Equal(
EntrypointType
.Script, entrypointAnnotation.Type);
966
Assert.Equal(
EntrypointType
.Script, entrypointAnnotation.Type);
985
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
1004
Assert.Equal(
EntrypointType
.Executable, entrypointAnnotation.Type);
1189
pythonBuilder.WithEntrypoint(
EntrypointType
.Module, "uvicorn")
1199
Assert.Equal(
EntrypointType
.Module, entrypointAnnotation.Type);
1221
pythonBuilder.WithEntrypoint(
EntrypointType
.Executable, "pytest");
1240
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, "flask"));
1251
builder.WithEntrypoint(
EntrypointType
.Module, "flask"));
1265
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, null!));
1269
resourceBuilder.WithEntrypoint(
EntrypointType
.Module, string.Empty));
1274
[InlineData(
EntrypointType
.Script, "other.py", "script")]
1275
[InlineData(
EntrypointType
.Script, "./other.py", "script")]
1276
[InlineData(
EntrypointType
.Module, "mymodule", "module")]
1277
[InlineData(
EntrypointType
.Executable, "pytest", "executable")]
1278
public async Task PublishWithExistingDockerfileThrowsWhenEntrypointIsChanged(
EntrypointType
entrypointType, string entrypoint, string expectedKind)
1303
.WithEntrypoint(
EntrypointType
.Module, "mymodule");
1322
.WithEntrypoint(
EntrypointType
.Module, "mymodule");
1365
.WithEntrypoint(
EntrypointType
.Script, "main.py");
1380
.WithEntrypoint(
EntrypointType
.Script, "./main.py");
1394
.WithEntrypoint(
EntrypointType
.Module, "mymodule")
1414
.WithEntrypoint(
EntrypointType
.Module, "mymodule");
1433
.WithEntrypoint(
EntrypointType
.Module, "mymodule");
1451
.WithEntrypoint(
EntrypointType
.Module, "mymodule")
1474
.WithEntrypoint(
EntrypointType
.Module, "mymodule")
1492
.WithEntrypoint(
EntrypointType
.Module, "mymodule")
1523
.WithEntrypoint(
EntrypointType
.Module, "mymodule");
1545
.WithEntrypoint(
EntrypointType
.Module, "mymodule")
Aspire.Hosting.Tests (1)
PythonAppDeployPipelineTests.cs (1)
27
.WithEntrypoint(
EntrypointType
.Module, "mymodule");