openfisca / openfisca-tunisia

Tunisian tax and benefit system for OpenFisca
http://www.openfisca.tn
15 stars 7 forks source link

Update openfisca-core requirement from <28,>=27 to >=29,<30 #90

Closed dependabot-preview[bot] closed 5 years ago

dependabot-preview[bot] commented 5 years ago

Updates the requirements on openfisca-core to permit the latest version.

Changelog *Sourced from [openfisca-core's changelog](https://github.com/openfisca/openfisca-core/blob/master/CHANGELOG.md).* > # 29.0.1 [#851](https://github-redirect.dependabot.com/openfisca/openfisca-core/pull/851) > > - Remove print statements from `simulations.py`, add linting options to detect stray print statements > > # 29.0.0 [#843](https://github-redirect.dependabot.com/openfisca/openfisca-core/pull/843) > > #### Breaking changes > > - Remove argument `simulation_json` of `Simulation` constructor, which was deprecated as of Core 25 > - Remove keyword arguments from Simulation constructor, which should be called only from SimulationBuilder; introduce a property for `trace` > - Remove `period` attribute of Simulation > > #### Migration notes > > - As of Core 25, the preferred way of constructing new Simulation instances is via SimulationBuilder, any remaining uses of scenarios should be migrated to that API first. > - Any period attribute of the Simulation was coming from the simulation data (test case or JSON structure), use that instead of the attribute in the Simulation instance. > - Any keyword arguments of Simulation that you were using (or passing to Simulation-constructing methods) can now be accessed directly or as properties, `trace` being the most widely used. Example below: > > **Before** > > ```Python > simulation = SimulationBuilder().build_from_entities(tax_benefit_system, input_data, trace = True) > ``` > > **After** > > ```Python > simulation = SimulationBuilder().build_from_entities(tax_benefit_system, input_data) > simulation.trace = True > ``` > > ### 28.0.1 [#845](https://github-redirect.dependabot.com/openfisca/openfisca-core/pull/845) > > - Consistently use the safe approach to YAML loading, fixing [this deprecation warning](https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation) introduced in PyYAML 5.1 > > # 28.0.0 [#847](https://github-redirect.dependabot.com/openfisca/openfisca-core/pull/847) > > #### Breaking changes > > Remove extra_params altogether from Core. This puts all formulas on an equal footing and simplifies > simulation and data storage code. > > #### Migration notes > > For almost all users, no migration is needed. > > You may be impacted only if you were computing (for instance in a notebook) one of the two variables from France that used this non-standard extension to the `calculate(variable, period)` API: `rsa_fictif` or `ppa_fictive`. In that case you had to supply the additional parameter `mois_demande`. Use `rsa` or `ppa` directly, and go back to the standard API. > > ### 27.0.2 [#844](https://github-redirect.dependabot.com/openfisca/openfisca-core/pull/844) > > ... (truncated)
Commits - [`5ddbbd2`](https://github.com/openfisca/openfisca-core/commit/5ddbbd2c226d7aa7564cff20d441d77e8482a3b9) Merge pull request [#852](https://github-redirect.dependabot.com/openfisca/openfisca-core/issues/852) from openfisca/remove-stray-prints - [`22e1f9a`](https://github.com/openfisca/openfisca-core/commit/22e1f9a2a9d7de584ff1b61280a9f43c5ce9e633) Bump version number - [`8f30fad`](https://github.com/openfisca/openfisca-core/commit/8f30fadb5d5c969a3b7b97d0400b4fed6083e886) Remove stray print statements - [`da11599`](https://github.com/openfisca/openfisca-core/commit/da115990a798a701ac9dd98cbb4b7bccd1549884) Reject changes that introduce print statements - [`36864a9`](https://github.com/openfisca/openfisca-core/commit/36864a90124c4a93e8c9ec6a6623d54ed38b4854) Merge pull request [#843](https://github-redirect.dependabot.com/openfisca/openfisca-core/issues/843) from openfisca/remove-simulation-json - [`b73f262`](https://github.com/openfisca/openfisca-core/commit/b73f2627f1942d9398ad07038fd33ceb66da5fe1) Bump version number - [`30fd42b`](https://github.com/openfisca/openfisca-core/commit/30fd42bd160b83770ae81e5a3b9f3a2ed7e15d9a) Fixturize test_variables - [`37c109c`](https://github.com/openfisca/openfisca-core/commit/37c109cf2fdf7e1cfb7782d08d1821c791f582f6) Fixturize test_reforms and upgrade to SimulationBuilder - [`dcf2a85`](https://github.com/openfisca/openfisca-core/commit/dcf2a8566340e0d322a785bae516be4d02c23272) Fixturize test_formulas and upgrade to SimulationBuilder - [`555b4ee`](https://github.com/openfisca/openfisca-core/commit/555b4eeb538d3a9de0c493a0b4c6eebf5bc8be2f) Fixturize test_cycles and upgrade to SimulationBuilder - Additional commits viewable in [compare view](https://github.com/openfisca/openfisca-core/compare/27.0.0...29.0.1)


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) Finally, you can contact us by mentioning @dependabot.
sandcha commented 5 years ago

Une seule erreur en réalité :

(...)
  File "/.../openfisca-tunisia/openfisca_tunisia/model/prelevements_obligatoires/cotisations_sociales.py", line 392, in formula
    individu('assiette_cotisations_sociales', period)
  File "/.../virtualenvs/tn90/lib/python3.7/site-packages/openfisca_core/entities.py", line 140, in __call__
    return self.simulation.calculate(variable_name, period, **parameters)
  File "/.../virtualenvs/tn90/lib/python3.7/site-packages/openfisca_core/simulations.py", line 131, in calculate
    array = self._run_formula(variable, entity, period, max_nb_cycles)
  File "/.../virtualenvs/tn90/lib/python3.7/site-packages/openfisca_core/simulations.py", line 248, in _run_formula
    self._check_formula_result(array, variable, entity, period)
  File "/.../virtualenvs/tn90/lib/python3.7/site-packages/openfisca_core/simulations.py", line 292, in _check_formula_result
    if self.debug:
AttributeError: 'Simulation' object has no attribute 'debug'

Lorsqu'on met simulation.clone(debug = True) dans les clones existants des réformes tunisia, le bug ne survient plus mais, sa source dans Core v29 reste à identifier.

Note : Testé sur Core v28.0.1. Les tests passent sans erreur.

sandcha commented 5 years ago

Erreur due à la suppression de l'attribut de classe debug pour Simulation. Il couvrait l'absence de self.debug.

sandcha commented 5 years ago

@benjello Corrigé. Bon pour p'tite revue.

dependabot-preview[bot] commented 5 years ago

A newer version of openfisca-core exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.