From 2652f9223ad208612f477d6b43e4d3e7f8410898 Mon Sep 17 00:00:00 2001 From: Mauko Quiroga Date: Wed, 16 Oct 2024 17:21:43 +0200 Subject: [PATCH] chore(exp): cleanup (#1274) --- openfisca_core/__init__.py | 36 ---------------------------- openfisca_core/formula_helpers.py | 9 +++++++ openfisca_core/memory_config.py | 9 +++++++ openfisca_core/rates.py | 9 +++++++ openfisca_core/simulation_builder.py | 16 +++++++++++++ 5 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 openfisca_core/formula_helpers.py create mode 100644 openfisca_core/memory_config.py create mode 100644 openfisca_core/rates.py create mode 100644 openfisca_core/simulation_builder.py diff --git a/openfisca_core/__init__.py b/openfisca_core/__init__.py index cea2665243..e69de29bb2 100644 --- a/openfisca_core/__init__.py +++ b/openfisca_core/__init__.py @@ -1,36 +0,0 @@ -"""The most widely adopted free and open-source engine to write rules as code.""" - -from openfisca_core.commons import ( - apply_thresholds, - average_rate, - concat, - marginal_rate, - switch, -) - -from . import types -from .experimental import MemoryConfig -from .simulations import ( - Simulation, - SimulationBuilder, - calculate_output_add, - calculate_output_divide, - check_type, - transform_to_strict_syntax, -) - -__all__ = [ - "MemoryConfig", - "Simulation", - "SimulationBuilder", - "apply_thresholds", - "average_rate", - "calculate_output_add", - "calculate_output_divide", - "check_type", - "concat", - "marginal_rate", - "switch", - "transform_to_strict_syntax", - "types", -] diff --git a/openfisca_core/formula_helpers.py b/openfisca_core/formula_helpers.py new file mode 100644 index 0000000000..e0c755348e --- /dev/null +++ b/openfisca_core/formula_helpers.py @@ -0,0 +1,9 @@ +# The formula_helpers module has been deprecated since X.X.X, +# and will be removed in the future. +# +# The helpers have been moved to the commons module. +# +# The following are transitional imports to ensure non-breaking changes. +# Could be deprecated in the next major release. + +from openfisca_core.commons import apply_thresholds, concat, switch # noqa: F401 diff --git a/openfisca_core/memory_config.py b/openfisca_core/memory_config.py new file mode 100644 index 0000000000..18c4cebcdc --- /dev/null +++ b/openfisca_core/memory_config.py @@ -0,0 +1,9 @@ +# The memory config module has been deprecated since X.X.X, +# and will be removed in the future. +# +# Module's contents have been moved to the experimental module. +# +# The following are transitional imports to ensure non-breaking changes. +# Could be deprecated in the next major release. + +from openfisca_core.experimental import MemoryConfig # noqa: F401 diff --git a/openfisca_core/rates.py b/openfisca_core/rates.py new file mode 100644 index 0000000000..9dfbbefcf0 --- /dev/null +++ b/openfisca_core/rates.py @@ -0,0 +1,9 @@ +# The formula_helpers module has been deprecated since X.X.X, +# and will be removed in the future. +# +# The helpers have been moved to the commons module. +# +# The following are transitional imports to ensure non-breaking changes. +# Could be deprecated in the next major release. + +from openfisca_core.commons import average_rate, marginal_rate # noqa: F401 diff --git a/openfisca_core/simulation_builder.py b/openfisca_core/simulation_builder.py new file mode 100644 index 0000000000..189bba3bcb --- /dev/null +++ b/openfisca_core/simulation_builder.py @@ -0,0 +1,16 @@ +# The simulation builder module has been deprecated since X.X.X, +# and will be removed in the future. +# +# Module's contents have been moved to the simulation module. +# +# The following are transitional imports to ensure non-breaking changes. +# Could be deprecated in the next major release. + +from openfisca_core.simulations import ( # noqa: F401 + Simulation, + SimulationBuilder, + calculate_output_add, + calculate_output_divide, + check_type, + transform_to_strict_syntax, +)