Openfisca-core

Latest version: v41.4.5

Safety actively analyzes 628919 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 48 of 60

14.1.1

Bug fix

- Fix `simulation.clone` and `entity.clone` methods.
- A bug was introduced in `14.1.0`

14.1.0

New features

- Introduce `/calculate` route in the preview API
- Allows to run calculations.
- Takes a simulation `JSON` as an input, and returns a copy of the input extended with calculation results.

- Handle `500` errors in the preview API
- In this case, the API returns a JSON with details about the error.

- Allows simulations to be built from a JSON using their constructor
- For instance `Simulation(simulation_json = {"persons": {...}, "households": {...}}, tax_benefit_system = tax_benefit_system)`

- Allows entities to be built from a JSON using their constructor
- For instance `Household(simulation, {"first_household": {...}})`

- Introduce `tax_benefit_system.get_variables(entity = None)`
- Allows to get all variables contained in a tax and benefit system, with filtering by entity

Deprecations

- Deprecate `simulation.holder_by_name`, `simulation.get_holder`, `get_or_new_holder`
- These functionalities are now provided by `entity.get_holder(name)`

- Deprecate constructor `Holder(simulation, column)`
- A `Holder` should now be instanciated with `Holder(entity = entity, column = column)`

14.0.1

* Improve error message and add stack trace when a module import fails

14.0.0

Breaking changes

- In variables:
- Merge `Variable` and `DatedVariable`.
- `Variable` can now handle formula evolution over time.
- Remove `start_date` attribute
- Rename `stop_date` attribute to `end`
- Introduce end string format `end = 'YYYY-MM-DD'`
- In formulas:
- Merge `SimpleFormula` and `DatedFormula`.
- `Formula` evolves over time.
- Remove `dated_function`
- start definition goes to formula name: `formula_YYYY[_MM[_DD]]`
- stop is deduced from next formula start

Before:

class your_variable(DatedVariable):
... attributes
start_date = datetime.date(2015, 05, 01)
stop_date = datetime.date(2017, 05, 31)

openfisca chooses most restrictive start in (start_date, dated_function start)
dated_function(start = date(2015, 1, 1), stop = date(2016, 12, 31))
def function_2015_something(self, simulation, period):
Calculate for 2015

dated_function(start = date(2016, 1, 1))
def function__different_name(self, simulation, period):
Calculate for 2016 > 2017-05-31 (including 2017-05-31 stop_date day)

After:

class your_variable(Variable):
... unchanged attributes
end = '2017-05-31' string format 'YYYY-MM-DD'

name should begin with 'formula' / you define the start in the name
def formula_2015_05_01(self, simulation, period): stops on last day before next formula
Calculate for 2015

def formula_2016(self, simulation, period): similar to formula_2016_01_01 or formula_2016_01
Calculate for 2016+ > 2017-05-31 (including 2017-05-31 end day)


New features

- Change `ETERNITY` period effect
- Remove restriction that prevented formula changes over time for a variable with `definition_period = ETERNITY`.

13.0.1

Bug fix

* Require numpy < 1.13.
- Openfisca is not yet compatible with the new numpy version 1.13.

13.0.0

Breaking changes

* Disallow text out of tags in XML parameters
- This prevents to add "comments" that would be lost by automated transformation of these parameters.

New features

* Introduce a "reference" attribute to document a source in XML parameters

Page 48 of 60

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.