openfisca / openfisca-core

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

Add tests to entities #1192

Closed bonjourmauko closed 1 year ago

bonjourmauko commented 1 year ago

Technical changes

coveralls commented 1 year ago

Coverage Status

coverage: 73.501% (-0.6%) from 74.127% when pulling 696e00f29fc211264c2d0a084468eb3654d8b82d on compose-entity into 23979eded23af8c20167b3a9b6c172cb9a54f32a on master.

bonjourmauko commented 1 year ago

@benjello This PR opened a couple of questions that I pose here for documentation purposes:

  1. Why the reliance on roles/subroles indexes?
  2. Why do we need bidirectional navigation entity <--> role?
  3. Why do we need bidirectional navigation entity <--> TBS?
  4. How does / where does the magic happen with the members_role projector?
  5. Why defining entity.CHILD and not something like entity.roles.where(key="child")?

These are all breaking-changes, but refactoring each could greatly facilitate maintenance and new features.

bonjourmauko commented 1 year ago

Is there anything missing for LTGM @benjello @MattiSG?