Redesign pipeline command with unified config structure and YAML includes#28
Merged
tomdurrant merged 1 commit intomainfrom Feb 23, 2026
Merged
Redesign pipeline command with unified config structure and YAML includes#28tomdurrant merged 1 commit intomainfrom
tomdurrant merged 1 commit intomainfrom
Conversation
…udes - Add YAML include loader with !include directive support - Relative/absolute path resolution - Environment variable expansion - Circular dependency detection - Maximum depth limit of 10 levels - Refactor pipeline command to support nested config structure - New structure: config, backend, postprocessor sections - CLI flags (--backend-config, --processor-config) override inline configs - Remove --run-backend flag in favor of --backend-config - Backend and postprocessor configs now optional (can be inline or via flags) - Update LocalPipelineBackend.execute() signature - Change from run_backend string to backend_config parameter - Add backward compatibility with deprecation warning - Require backend_config and processor as mandatory parameters - Add helper function for loading processor configs from dicts - Update ModelRun.pipeline() docstring to reflect new parameters - Update example configurations to new structure - basic_pipeline.yml: simplified with new format - pipeline_config.yml: 6 comprehensive examples including YAML includes - Add comprehensive test coverage - 16 tests for YAML include loader - 12 tests for pipeline config structure (inline, includes, validation) - Update 14 existing pipeline backend tests to use backend_config - Add migration guide documenting breaking changes and migration path Breaking changes: - Pipeline configs must use 'config', 'backend', 'postprocessor' keys - Backend configs must use 'type' instead of 'backend_type' - --run-backend CLI flag removed (use --backend-config instead) - LocalPipelineBackend.execute() requires backend_config parameter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rompy pipelinecommand to support a cleaner, unified configuration structure!includedirective for composable configurationsKey Changes
New Configuration Structure
Pipeline configs now use three top-level keys:
config: ModelRun configuration (portable, backend-agnostic)backend: Optional backend configuration (can be overridden with --backend-config)postprocessor: Optional postprocessor configuration (can be overridden with --processor-config)YAML Include Loader
IncludeLoaderclass with!includetag supportBreaking Changes
--run-backendCLI flag removed (use--backend-configinstead)LocalPipelineBackend.execute()signature changed fromrun_backend: strtobackend_config: BackendConfigBackward Compatibility
docs/PIPELINE_MIGRATION.mdTesting
Files Changed
Created:
src/rompy/core/yaml_loader.py- YAML include loader implementationtests/test_yaml_loader.py- YAML loader teststests/test_pipeline_config.py- Pipeline config integration testsdocs/PIPELINE_MIGRATION.md- Migration guideModified:
src/rompy/cli.py- Updatedload_config()andpipeline()commandsrc/rompy/model.py- Updatedpipeline()docstringsrc/rompy/pipeline/__init__.py- UpdatedLocalPipelineBackend.execute()signaturesrc/rompy/postprocess/config.py- Added helper functionexamples/configs/basic_pipeline.yml- Updated to new structureexamples/configs/pipeline_config.yml- 6 comprehensive examples including YAML includestests/backends/test_enhanced_backends.py- Updated 14 testsExample Configuration
Design Principles