Essentially, country packages should specify the required group entities, and the default roles that should be assigned when grouping "orphan" entities into groups. For OpenFisca-US, this looks like:
class IndividualSim(GeneralIndividualSim):
tax_benefit_system = CountryTaxBenefitSystem
entities = {entity.key: entity for entity in entities}
default_dataset = CPS
# New code below
required_entities = ["household", "spm_unit", "family", "tax_unit"]
default_roles = {
"household": "member",
"spm_unit": "member",
"family": "member",
"tax_unit": "member",
}
Fixes #46 (by making it redundant) Fixes #25
Essentially, country packages should specify the required group entities, and the default roles that should be assigned when grouping "orphan" entities into groups. For OpenFisca-US, this looks like: