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 19 of 60

34.4.1

- Improve performance graph introduced in 34.4.0
- Sort frames by calculation time
- Increase graph precision
- Make the HTML graph self-supported: it can now be open with a simple browser, without starting a local server

34.4.0

New features

- Introduce the time performance flame graph
- Generates a flame graph in a web page to view the time taken by every calculation in a simulation
- Introduces `--performance` option to `openfisca test` command to generate a YAML test graph

Usage notes

1. To generate the flame graph:
* For a Python simulation:

py
tax_benefit_system = CountryTaxBenefitSystem()
simulation = SimulationBuilder().build_default_simulation(tax_benefit_system)

simulation.trace = True set the full tracer
[... simulation.calculate(...) ...]
simulation.tracer.performance_log.generate_graph(".") generate graph in chosen directory


* For a YAML test, execute the test with the `--performance` option.

For example, to run the `irpp.yaml` test in `openfisca-france/` run:
sh
openfisca test tests/formulas/irpp.yaml --performance -c openfisca_france

This generates an `index.html` file in the current directory.

2. From the current directory, run a Python web server (here on port `5000`):

`python -m http.server 5000`

3. See the flame graph result in your browser at `http://localhost:5000`.
This interprets the generated `index.html`.

When your yaml file contains multiple tests, only the last one is displayed in the flame chart.
You can use [openfisca test --name_filter option](https://openfisca.org/doc/openfisca-python-api/openfisca-run-test.html) to choose a specific test case.

34.3.3

Technical change

- Update dependency: numexpr

34.3.2

Technical change

- Update dependency: numpy

34.3.1

Bug fix

- Fix serialisation error introduced in [34.2.9](https://github.com/openfisca/openfisca-core/tree/34.2.9) in route `/trace` (Web API)
- This was causing an Internal Server Error
- Notably, `numpy` arrays were not being parsed correctly as not JSON serialisable

34.3.0

_Note: this version has been unpublished due to an issue introduced by 34.2.9 in the Web API. Please use 34.3.1 or a more recent version._

- Update pytest version's upper bound to 6.0.0

Page 19 of 60

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.