Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/populace-build/src/populace/build/gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class TargetCoverageRequirement:
accepted_name_substrings: tuple[str, ...] = ()
accepted_measures: tuple[str, ...] = ()
accepted_families: tuple[str, ...] = ()
required_measures: tuple[str, ...] = ()
required_metadata: tuple[tuple[str, str], ...] = ()
min_matches: int = 1
notes: str = ""
Expand Down Expand Up @@ -270,6 +271,11 @@ def _matches_target_requirement(
)
if not selector_matched:
return False
if (
requirement.required_measures
and entry.measure not in requirement.required_measures
):
return False
return all(
entry.metadata.get(key) == value for key, value in requirement.required_metadata
)
Expand Down
10 changes: 10 additions & 0 deletions packages/populace-build/src/populace/build/us/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@
from populace.build.us.fiscal_targets import (
US_FISCAL_MACRO_REALISM_BANDS,
US_FISCAL_TARGET_COVERAGE_REQUIREMENTS,
US_FISCAL_TARGET_REGISTRY,
US_FISCAL_TARGET_SPECS,
US_JCT_TAX_EXPENDITURE_REFORMS,
US_JCT_TAX_EXPENDITURE_TARGET_SPECS,
US_SOI_FISCAL_TARGET_SPECS,
US_STATE_INCOME_TAX_TARGET_SPECS,
SimpleTaxExpenditureReform,
)
from populace.frame import Frame
Expand All @@ -45,12 +50,17 @@
"SimpleTaxExpenditureReform",
"US_DONORS",
"US_FISCAL_MACRO_REALISM_BANDS",
"US_FISCAL_TARGET_REGISTRY",
"US_FISCAL_TARGET_SPECS",
"US_FISCAL_TARGET_COVERAGE_REQUIREMENTS",
"US_JCT_TAX_EXPENDITURE_REFORMS",
"US_JCT_TAX_EXPENDITURE_TARGET_SPECS",
"US_NONNEGATIVE_SOURCE_OUTPUTS",
"US_SOI_FISCAL_TARGET_SPECS",
"US_SOURCE_MANIFEST",
"US_SOURCE_STAGE_SPECS",
"US_STAGE_NAMES",
"US_STATE_INCOME_TAX_TARGET_SPECS",
"us_plan",
]

Expand Down
Loading
Loading