@@ -35,7 +35,7 @@ public static Task<int> Main(string[] args) =>
3535 ) ;
3636
3737 /// <summary>
38- /// Configures services for the application. Used by test infrastructure.
38+ /// Configures services for the application.
3939 /// </summary>
4040 public static IServiceProvider ConfigureServices ( string ? basePath = null )
4141 {
@@ -56,62 +56,48 @@ private static void ConfigureServices(IServiceCollection services, string basePa
5656 // Each library owns its own catalog. Registered by concrete type so each
5757 // pipeline factory receives the correct strongly-typed instance.
5858
59- flowthru . UseCatalog < DataProcessingCatalog > ( _ => new DataProcessingCatalog ( dataPath ) ) ;
60- flowthru . UseCatalog < DataScienceCatalog > ( _ => new DataScienceCatalog ( dataPath ) ) ;
61- flowthru . UseCatalog < ReportingCatalog > ( _ => new ReportingCatalog ( dataPath ) ) ;
62-
63- // ─── Metadata Providers ───────────────────────────────────────────────
64-
65- flowthru . ConfigureMetadata ( meta =>
66- {
67- var metadataPath = Path . Combine ( basePath , "Metadata" ) ;
68- meta . AddProvider < JsonMetadataProvider , JsonMetadataProviderBuilder > ( json =>
69- json . WithOutputDirectory ( metadataPath )
70- )
71- . AddProvider < MermaidMetadataProvider , MermaidMetadataProviderBuilder > ( mermaid =>
72- mermaid . WithOutputDirectory ( metadataPath )
73- ) ;
74- } ) ;
59+ flowthru . UseCatalog ( _ => new DataProcessingCatalog ( dataPath ) ) ;
60+ flowthru . UseCatalog ( _ => new DataScienceCatalog ( dataPath ) ) ;
61+ flowthru . UseCatalog ( _ => new ReportingCatalog ( dataPath ) ) ;
7562
7663 // ─── Pipeline Registration ─────────────────────────────────────────────
77- // Single-catalog pipeline: reads from and writes to DataProcessingCatalog only.
64+ // Each pipeline's Create method signature IS the cross-catalog contract.
65+ // The framework resolves catalogs and config automatically from DI.
66+
7867 flowthru
79- . RegisterPipeline < DataProcessingCatalog > (
80- label : "DataProcessing" ,
81- pipeline : DataProcessingPipeline . Create
82- )
68+ . RegisterPipeline ( label : "DataProcessing" , pipeline : DataProcessingPipeline . Create )
8369 . WithDescription ( "Preprocesses companies and shuttles data into a model input table" ) ;
8470
85- // 2-catalog pipeline: reads model input from DataProcessing, writes model artifacts to DataScience.
86- // The two-catalog signature makes the cross-domain dependency an explicit compile-time contract.
8771 flowthru
88- . RegisterPipelineWithConfiguration <
89- DataProcessingCatalog ,
90- DataScienceCatalog ,
91- DataSciencePipeline . Params
92- > (
72+ . RegisterPipeline (
9373 label : "DataScience" ,
9474 pipeline : DataSciencePipeline . Create ,
9575 configurationSection : "Flowthru:Pipelines:DataScience"
9676 )
9777 . WithDescription ( "Trains linear regression model for shuttle price prediction" ) ;
9878
99- // 3-catalog pipeline: reads preprocessed shuttles (DataProcessing) and model predictions
100- // (DataScience), writes all reports and charts to ReportingCatalog.
10179 flowthru
102- . RegisterPipelineWithConfiguration <
103- DataProcessingCatalog ,
104- DataScienceCatalog ,
105- ReportingCatalog ,
106- ReportingPipeline . Params
107- > (
80+ . RegisterPipeline (
10881 label : "Reporting" ,
10982 pipeline : ReportingPipeline . Create ,
11083 configurationSection : "Flowthru:Pipelines:Reporting"
11184 )
11285 . WithDescription (
11386 "Generates passenger capacity reports and confusion matrix visualizations"
11487 ) ;
88+
89+ // ─── Metadata Providers ───────────────────────────────────────────────
90+
91+ flowthru . ConfigureMetadata ( meta =>
92+ {
93+ var metadataPath = Path . Combine ( basePath , "Metadata" ) ;
94+ meta . AddProvider < JsonMetadataProvider , JsonMetadataProviderBuilder > ( json =>
95+ json . WithOutputDirectory ( metadataPath )
96+ )
97+ . AddProvider < MermaidMetadataProvider , MermaidMetadataProviderBuilder > ( mermaid =>
98+ mermaid . WithOutputDirectory ( metadataPath )
99+ ) ;
100+ } ) ;
115101 } ) ;
116102
117103 services . AddLogging ( logging =>
0 commit comments