Closed
Conversation
Member
Author
|
@benjello is this the intented definition and use of subroles or am I missing something? |
benjello
reviewed
Dec 1, 2023
openfisca_core/entities/_subrole.py
Outdated
| >>> from openfisca_core import entities | ||
|
|
||
| >>> entity = entities.GroupEntity("person", "", "", "", {}) | ||
| >>> role = entities.Role({"key": "sorority"}, entity) |
Member
There was a problem hiding this comment.
This sorority example is not very clear to me.
benjello
reviewed
Dec 1, 2023
openfisca_core/entities/_subrole.py
Outdated
| Examples: | ||
| >>> from openfisca_core import entities | ||
|
|
||
| >>> entity = entities.GroupEntity("person", "", "", "", {}) |
Member
There was a problem hiding this comment.
The group entity is not clear here.
c78940a to
184be83
Compare
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.
Depends on #1197
New features
SubRole.Discussion
Currently, roles and subroles coexist and are used interchangeably, as
instances of the
Roledata model. This is very confusing, as the only thingthey have in common is the
keyattribute, shared with every other data modelin the
entitiesmodule. By declaringSubRoleas an independent data modelfrom
Role, we can make the distinction between the two clearer, improvingreadability, maintenance, debugging, and eventual extensibility of both.