Split configured cycle dependency composition#648
Merged
Conversation
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.
Motivation
configured_cycle_runner.pyby extracting dependency composition into a focused module so the runner can remain focused on loop/summary/history wiring.Description
src/carbonfactor_parser/pipeline/configured_cycle_dependencies.pywhich definesConfiguredCycleValidationBoundary, helper_ghg/_defra/_ipccsource-year mappers, andbuild_configured_cycle_dependencies(config, runtime)returningProductionE2EYearOrchestratorDependencies.src/carbonfactor_parser/pipeline/configured_cycle_runner.pyto callbuild_configured_cycle_dependenciesand importConfiguredCycleValidationBoundaryfrom the new module for compatibility.tests/test_configured_cycle_runner.pyto assert backward-compatible imports and thatbuild_configured_cycle_dependencieswires source adapters, parser boundaries, validation boundary, andPostgreSQLSourceFamilyRuntimeRepositorywith the runtime connection correctly.Testing
python -m pytest tests/test_configured_cycle_runner.py tests/test_run_ingestion_summary_cli.pyand both passed.python -m pytest tests/test_ingestion_run_history_mapping.py tests/test_ingestion_run_history_repository.py tests/test_ingestion_run_history_reader.pyand all passed.python -m pytestwhich completed successfully (2147 passed, 8 skipped).python -m ruff check src/carbonfactor_parser/pipeline/configured_cycle_runner.py src/carbonfactor_parser/pipeline/configured_cycle_dependencies.py tests/test_configured_cycle_runner.pyandgit diff --checkwith no issues.Codex Task