graduate pipreport (#1219)
This commit is contained in:
Родитель
80146ce1b9
Коммит
3d161b08b2
|
@ -11,7 +11,7 @@ using Microsoft.ComponentDetection.Contracts.Internal;
|
|||
using Microsoft.ComponentDetection.Contracts.TypedComponent;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
public class PipComponentDetector : FileComponentDetector
|
||||
public class PipComponentDetector : FileComponentDetector, IDefaultOffComponentDetector
|
||||
{
|
||||
private readonly IPythonCommandService pythonCommandService;
|
||||
private readonly IPythonResolver pythonResolver;
|
||||
|
@ -38,7 +38,7 @@ public class PipComponentDetector : FileComponentDetector
|
|||
|
||||
public override IEnumerable<ComponentType> SupportedComponentTypes { get; } = new[] { ComponentType.Pip };
|
||||
|
||||
public override int Version { get; } = 12;
|
||||
public override int Version { get; } = 13;
|
||||
|
||||
protected override async Task<IObservable<ProcessRequest>> OnPrepareDetectionAsync(
|
||||
IObservable<ProcessRequest> processRequests,
|
||||
|
|
|
@ -16,7 +16,7 @@ using Microsoft.ComponentDetection.Contracts.TypedComponent;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class PipReportComponentDetector : FileComponentDetector, IExperimentalDetector
|
||||
public class PipReportComponentDetector : FileComponentDetector
|
||||
{
|
||||
// environment variables
|
||||
private const string PipReportOverrideBehaviorEnvVar = "PipReportOverrideBehavior";
|
||||
|
@ -76,7 +76,7 @@ public class PipReportComponentDetector : FileComponentDetector, IExperimentalDe
|
|||
|
||||
public override IEnumerable<ComponentType> SupportedComponentTypes { get; } = new[] { ComponentType.Pip };
|
||||
|
||||
public override int Version { get; } = 5;
|
||||
public override int Version { get; } = 6;
|
||||
|
||||
protected override bool EnableParallelism { get; set; } = true;
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
namespace Microsoft.ComponentDetection.Orchestrator.Experiments.Configs;
|
||||
|
||||
using Microsoft.ComponentDetection.Contracts;
|
||||
using Microsoft.ComponentDetection.Detectors.Pip;
|
||||
|
||||
/// <summary>
|
||||
/// Validating the <see cref="PipReportComponentDetector"/>.
|
||||
/// </summary>
|
||||
public class PipReportExperiment : IExperimentConfiguration
|
||||
{
|
||||
public string Name => "PipReport";
|
||||
|
||||
public bool IsInControlGroup(IComponentDetector componentDetector) => componentDetector is PipComponentDetector;
|
||||
|
||||
public bool IsInExperimentGroup(IComponentDetector componentDetector) => componentDetector is PipReportComponentDetector;
|
||||
|
||||
public bool ShouldRecord(IComponentDetector componentDetector, int numComponents) => true;
|
||||
}
|
|
@ -63,7 +63,6 @@ public static class ServiceCollectionExtensions
|
|||
services.AddSingleton<IExperimentConfiguration, SimplePipExperiment>();
|
||||
services.AddSingleton<IExperimentConfiguration, RustCliDetectorExperiment>();
|
||||
services.AddSingleton<IExperimentConfiguration, GoDetectorReplaceExperiment>();
|
||||
services.AddSingleton<IExperimentConfiguration, PipReportExperiment>();
|
||||
|
||||
// Detectors
|
||||
// CocoaPods
|
||||
|
|
Загрузка…
Ссылка в новой задаче