You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allows for querying the variables defined for an entity.
Deprecations
Remove CoreEntity.check_role_validity
The method in itself had no relation to entities (it was a static
method, so no depending neither on an entity class nor an instance). It
could have been kept as a populations helper, where it was exclusively
used. Nonetheless, check_role_validity had the peculiar behaviour of
not failing but when the value of role is not None, that granted it
in the author's opinion the right to be removed so as to avoid confusion.
Deprecate class_override arg from entities.build_entity
That argument actually did nothing, and linters have been complaining
about this argument for almost 10 years now. It is only being marked as
a breaking change for respect to the semantic versioning protocol.
The feature is still provided by CoreEntity.get_variable when passed
the optional positional or keyword argument check_existence. In fact,
the removed method was duplicating and already existing behaviour.
Deprecate CoreEntity.set_tax_benefit_system
The feature is now provided by simple variable assignment:
entity.tax_benefit_system=tax_benefit_system
Likewise, entity.tax_benefit_system becomes part of the public API
(which implicitly it was as the private marker was being violated).
@bonjourmauko : please take a look at openfisca-survey-manager to see if these deprecations do affect the package. openfisca-core and openfisca-survey-manager are closely related through usage.
Indeed, a lot of users use country packages with openfisca-survey-manager and may end-up in trouble if their country package works needs the latest version of openfisca-core and while having recent legislation but cannot run with openfisca-survey-manager.
IMHO, the version bumps should follow openfisca-core -> openfisca-survey-manager -> openfisca-country
And the sooner we check, the best we are prepared.
We can temporise this one, it is not urgent (it is purely deprecations, so it is expected that it wreaks havoc down the line; yet all deprecations are duplicates with corresponding features).
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
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 #1285
New features
CoreEntity.variablesDeprecations
CoreEntity.check_role_validityentities(it was a staticmethod, so no depending neither on an entity class nor an instance). It
could have been kept as a
populationshelper, where it was exclusivelyused. Nonetheless,
check_role_validityhad the peculiar behaviour ofnot failing but when the value of
roleis notNone, that granted itin the author's opinion the right to be removed so as to avoid confusion.
class_overridearg fromentities.build_entityabout this argument for almost 10 years now. It is only being marked as
a breaking change for respect to the semantic versioning protocol.
CoreEntity.check_variable_defined_for_entityCoreEntity.get_variablewhen passedthe optional positional or keyword argument
check_existence. In fact,the removed method was duplicating and already existing behaviour.
CoreEntity.set_tax_benefit_systementity.tax_benefit_systembecomes part of the public API(which implicitly it was as the private marker was being violated).
Technical changes
openfisca-extension-templatetests