Add Stage 2 target catalog selection#1084
Draft
anth-volk wants to merge 1 commit into
Draft
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.
Fixes #1083
Summary
TargetCatalogReader,TargetCatalog,TargetSelectionPolicy, andTargetSelectionResult.UnifiedMatrixBuilderas the matrix consumer via selected target metadata.calibration_targets.jsonlandcalibration_target_facets.json, include selection checksum metadata, and reference both artifacts from the Stage 2 contract and manifest output bundle.Validation
uv run --no-sync python -m py_compile policyengine_us_data/calibration_package/targets.py policyengine_us_data/calibration_package/specs.py policyengine_us_data/calibration_package/__init__.py policyengine_us_data/calibration/unified_calibration.py policyengine_us_data/calibration/unified_matrix_builder.py policyengine_us_data/stage_contracts/calibration_package.pyuv run --no-sync ruff check policyengine_us_data/calibration/unified_calibration.py policyengine_us_data/calibration/unified_matrix_builder.py policyengine_us_data/calibration_package/__init__.py policyengine_us_data/calibration_package/specs.py policyengine_us_data/calibration_package/targets.py policyengine_us_data/stage_contracts/calibration_package.py tests/unit/calibration_package/test_specs.py tests/unit/calibration_package/test_targets.py tests/unit/test_calibration_package_stage_contract.py tests/unit/test_pipeline_docs_extractor.pyuv run --no-sync ruff format --check policyengine_us_data/calibration/unified_calibration.py policyengine_us_data/calibration/unified_matrix_builder.py policyengine_us_data/calibration_package/__init__.py policyengine_us_data/calibration_package/specs.py policyengine_us_data/calibration_package/targets.py policyengine_us_data/stage_contracts/calibration_package.py tests/unit/calibration_package/test_specs.py tests/unit/calibration_package/test_targets.py tests/unit/test_calibration_package_stage_contract.py tests/unit/test_pipeline_docs_extractor.pyuv run --no-sync python -m pytest tests/unit/calibration_package/test_targets.py tests/unit/calibration_package/test_specs.py tests/unit/test_calibration_package_stage_contract.py tests/unit/test_pipeline_docs_extractor.py(47 passed)uv run --no-sync python -m pytest tests/unit/calibration/test_target_config.py tests/unit/calibration/test_unified_matrix_builder.py::TestQueryTargets(39 passed)uv run --no-sync python -m pytest tests/unit/test_remote_calibration_runner.py tests/unit/test_pipeline_doc_guards.py tests/unit/calibration_package/test_payload.py tests/unit/build_outputs/test_geography_loader.py(24 passed, 1 skipped fromtests/unit/test_pipeline.pywhen run separately due local Modal import skip)uv run --no-sync python -m pytest tests/unit/test_pipeline_source_contracts.py tests/unit/test_pipeline_docs_extractor.py tests/unit/test_pipeline_doc_guards.py(18 passed)uv run --no-sync --with pyyaml python scripts/extract_pipeline_docs.py --json /private/tmp/us-data-pr-2d-pipeline-docs/pipeline_map.json --api-json /private/tmp/us-data-pr-2d-pipeline-docs/pipeline_api.json --markdown /private/tmp/us-data-pr-2d-pipeline-docs/pipeline-map.mduv run --no-sync --with pyyaml python scripts/run_quality_guards.pygit diff --checkmake lintNotes
tests/unit/calibration/test_unified_calibration.pyand several broader matrix/ETL/query tests. I ran the directly affected target-config and query-target tests plus the new target artifact/contract/pipeline docs coverage; broader full selector pytest was not run to avoid the known long collection/runtime behavior in this local environment.