openfisca / openfisca-core

OpenFisca core engine. See other repositories for countries-specific code & data.
https://openfisca.org
GNU Affero General Public License v3.0
165 stars 74 forks source link

Refactor subroles #1196

Open bonjourmauko opened 9 months ago

bonjourmauko commented 9 months ago

Depends on #1197

New features

Discussion

Currently, roles and subroles coexist and are used interchangeably, as instances of the Role data model. This is very confusing, as the only thing they have in common is the key attribute, shared with every other data model in the entities module. By declaring SubRole as an independent data model from Role, we can make the distinction between the two clearer, improving readability, maintenance, debugging, and eventual extensibility of both.

coveralls commented 9 months ago

Coverage Status

coverage: 73.695% (+0.2%) from 73.501% when pulling c78940ace2f055488331ed7e5955282d8cd6309c on compose-entity-2 into a3c2f8324d5b139c3fbf2b0b9190c630661af66c on master.

bonjourmauko commented 9 months ago

@benjello is this the intented definition and use of subroles or am I missing something?