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); 185return AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, DefaultVirtualEnvFolder) 228return AddPythonAppCore(builder, name, appDirectory, EntrypointType.Script, scriptPath, virtualEnvironmentPath) 277EntrypointType.Executable, 336IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 344IDistributedApplicationBuilder builder, string name, string appDirectory, EntrypointType entrypointType, 461var entrypointType = entrypointAnnotation.Type; 549PythonAppResource resource, ContainerResource containerResource, EntrypointType declaredType, string declaredEntrypoint) 565(declaredType == EntrypointType.Script && 588string pythonVersion, EntrypointType entrypointType, string entrypoint) 680case EntrypointType.Script: 683case EntrypointType.Module: 686case EntrypointType.Executable: 693string pythonVersion, EntrypointType entrypointType, string entrypoint) 780case EntrypointType.Script: 783case EntrypointType.Module: 786case EntrypointType.Executable: 944EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypointAnnotation.Entrypoint), 945EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 997var entrypointType = entrypointAnnotation.Type; 1009if (entrypointType == EntrypointType.Script) 1096this IResourceBuilder<T> builder, EntrypointType entrypointType, string entrypoint) where T : PythonAppResource 1113EntrypointType.Executable => virtualEnvironment.GetExecutable(entrypoint), 1114EntrypointType.Script or EntrypointType.Module => virtualEnvironment.GetExecutable("python"), 1138var entrypointType = existingAnnotation.Type; 1144case EntrypointType.Module: 1148case EntrypointType.Script: 1151case EntrypointType.Executable:
PythonEntrypointAnnotation.cs (1)
16public required EntrypointType Type { get; set; }
Aspire.Hosting.Python.Tests (28)
AddPythonAppTests.cs (28)
222Assert.Equal(EntrypointType.Script, entrypointAnnotation.Type); 966Assert.Equal(EntrypointType.Script, entrypointAnnotation.Type); 985Assert.Equal(EntrypointType.Module, entrypointAnnotation.Type); 1004Assert.Equal(EntrypointType.Executable, entrypointAnnotation.Type); 1189pythonBuilder.WithEntrypoint(EntrypointType.Module, "uvicorn") 1199Assert.Equal(EntrypointType.Module, entrypointAnnotation.Type); 1221pythonBuilder.WithEntrypoint(EntrypointType.Executable, "pytest"); 1240resourceBuilder.WithEntrypoint(EntrypointType.Module, "flask")); 1251builder.WithEntrypoint(EntrypointType.Module, "flask")); 1265resourceBuilder.WithEntrypoint(EntrypointType.Module, null!)); 1269resourceBuilder.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")] 1278public 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");