From 684d691b78ce0650ffb4c6624cc7d034b0ecf8bf Mon Sep 17 00:00:00 2001 From: giovanni Date: Fri, 5 Sep 2025 11:12:50 +0200 Subject: [PATCH] remove back compatibility files for version 0.2 --- pina/adaptive_functions/__init__.py | 16 --------------- pina/callbacks/__init__.py | 16 --------------- pina/geometry/__init__.py | 20 ------------------- pina/model/layers/__init__.py | 16 --------------- pina/operators.py | 16 --------------- pina/plotter.py | 3 --- pina/solvers/__init__.py | 16 --------------- pina/solvers/pinns/__init__.py | 17 ---------------- .../test_convolution.py | 0 .../test_embedding.py | 0 .../test_fourier.py | 0 .../test_low_rank_block.py | 0 .../test_orthogonal.py | 0 .../test_pirate_network_block.py | 0 tests/{test_blocks => test_block}/test_pod.py | 0 tests/{test_blocks => test_block}/test_rbf.py | 0 .../test_residual.py | 0 .../test_spectral_convolution.py | 0 .../test_cartesian.py | 0 .../test_difference.py | 0 .../test_ellipsoid.py | 0 .../test_exclusion.py | 0 .../test_intersection.py | 0 .../test_simplex.py | 0 .../test_union.py | 0 .../test_equation.py | 0 .../test_system_equation.py | 0 27 files changed, 120 deletions(-) delete mode 100644 pina/adaptive_functions/__init__.py delete mode 100644 pina/callbacks/__init__.py delete mode 100644 pina/geometry/__init__.py delete mode 100644 pina/model/layers/__init__.py delete mode 100644 pina/operators.py delete mode 100644 pina/plotter.py delete mode 100644 pina/solvers/__init__.py delete mode 100644 pina/solvers/pinns/__init__.py rename tests/{test_blocks => test_block}/test_convolution.py (100%) rename tests/{test_blocks => test_block}/test_embedding.py (100%) rename tests/{test_blocks => test_block}/test_fourier.py (100%) rename tests/{test_blocks => test_block}/test_low_rank_block.py (100%) rename tests/{test_blocks => test_block}/test_orthogonal.py (100%) rename tests/{test_blocks => test_block}/test_pirate_network_block.py (100%) rename tests/{test_blocks => test_block}/test_pod.py (100%) rename tests/{test_blocks => test_block}/test_rbf.py (100%) rename tests/{test_blocks => test_block}/test_residual.py (100%) rename tests/{test_blocks => test_block}/test_spectral_convolution.py (100%) rename tests/{test_geometry => test_domain}/test_cartesian.py (100%) rename tests/{test_geometry => test_domain}/test_difference.py (100%) rename tests/{test_geometry => test_domain}/test_ellipsoid.py (100%) rename tests/{test_geometry => test_domain}/test_exclusion.py (100%) rename tests/{test_geometry => test_domain}/test_intersection.py (100%) rename tests/{test_geometry => test_domain}/test_simplex.py (100%) rename tests/{test_geometry => test_domain}/test_union.py (100%) rename tests/{test_equations => test_equation}/test_equation.py (100%) rename tests/{test_equations => test_equation}/test_system_equation.py (100%) diff --git a/pina/adaptive_functions/__init__.py b/pina/adaptive_functions/__init__.py deleted file mode 100644 index 6df3338..0000000 --- a/pina/adaptive_functions/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Old module for adaptive functions. Deprecated in 0.2.0.""" - -import warnings - -from ..adaptive_function import * -from ..utils import custom_warning_format - -# back-compatibility 0.1 -# Set the custom format for warnings -warnings.formatwarning = custom_warning_format -warnings.filterwarnings("always", category=DeprecationWarning) -warnings.warn( - "'pina.adaptive_functions' is deprecated and will be removed " - "in future versions. Please use 'pina.adaptive_function' instead.", - DeprecationWarning, -) diff --git a/pina/callbacks/__init__.py b/pina/callbacks/__init__.py deleted file mode 100644 index 69f8782..0000000 --- a/pina/callbacks/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Old module for callbacks. Deprecated in 0.2.0.""" - -import warnings - -from ..callback import * -from ..utils import custom_warning_format - -# back-compatibility 0.1 -# Set the custom format for warnings -warnings.formatwarning = custom_warning_format -warnings.filterwarnings("always", category=DeprecationWarning) -warnings.warn( - "'pina.callbacks' is deprecated and will be removed " - "in future versions. Please use 'pina.callback' instead.", - DeprecationWarning, -) diff --git a/pina/geometry/__init__.py b/pina/geometry/__init__.py deleted file mode 100644 index 762820a..0000000 --- a/pina/geometry/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -"""Old module for geometry classes and functions. Deprecated in 0.2.0.""" - -import warnings - -from ..domain import * -from ..utils import custom_warning_format - -# back-compatibility 0.1 -# creating alias -Location = DomainInterface - -# Set the custom format for warnings -warnings.formatwarning = custom_warning_format -warnings.filterwarnings("always", category=DeprecationWarning) -warnings.warn( - "'pina.geometry' is deprecated and will be removed " - "in future versions. Please use 'pina.domain' instead. " - "Location moved to DomainInferface object.", - DeprecationWarning, -) diff --git a/pina/model/layers/__init__.py b/pina/model/layers/__init__.py deleted file mode 100644 index aeef265..0000000 --- a/pina/model/layers/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Old layers module, deprecated in 0.2.0.""" - -import warnings - -from ..block import * -from ...utils import custom_warning_format - -# back-compatibility 0.1 -# Set the custom format for warnings -warnings.formatwarning = custom_warning_format -warnings.filterwarnings("always", category=DeprecationWarning) -warnings.warn( - "'pina.model.layers' is deprecated and will be removed " - "in future versions. Please use 'pina.model.block' instead.", - DeprecationWarning, -) diff --git a/pina/operators.py b/pina/operators.py deleted file mode 100644 index cb2fb5e..0000000 --- a/pina/operators.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Old module for operators. Deprecated in 0.2.0.""" - -import warnings - -from .operator import * -from .utils import custom_warning_format - -# back-compatibility 0.1 -# Set the custom format for warnings -warnings.formatwarning = custom_warning_format -warnings.filterwarnings("always", category=DeprecationWarning) -warnings.warn( - "'pina.operators' is deprecated and will be removed " - "in future versions. Please use 'pina.operator' instead.", - DeprecationWarning, -) diff --git a/pina/plotter.py b/pina/plotter.py deleted file mode 100644 index fcd4ded..0000000 --- a/pina/plotter.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Module for Plotter""" - -raise ImportError("'pina.plotter' is deprecated and cannot be imported.") diff --git a/pina/solvers/__init__.py b/pina/solvers/__init__.py deleted file mode 100644 index 366b1b7..0000000 --- a/pina/solvers/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Old module for solvers. Deprecated in 0.2.0 .""" - -import warnings - -from ..solver import * -from ..utils import custom_warning_format - -# back-compatibility 0.1 -# Set the custom format for warnings -warnings.formatwarning = custom_warning_format -warnings.filterwarnings("always", category=DeprecationWarning) -warnings.warn( - "'pina.solvers' is deprecated and will be removed " - "in future versions. Please use 'pina.solver' instead.", - DeprecationWarning, -) diff --git a/pina/solvers/pinns/__init__.py b/pina/solvers/pinns/__init__.py deleted file mode 100644 index 4ae8844..0000000 --- a/pina/solvers/pinns/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Old module for the PINNs solver. Deprecated in 0.2.0.""" - -import warnings - -from ...solver.physics_informed_solver import * -from ...utils import custom_warning_format - -# back-compatibility 0.1 -# Set the custom format for warnings -warnings.formatwarning = custom_warning_format -warnings.filterwarnings("always", category=DeprecationWarning) -warnings.warn( - "'pina.solvers.pinns' is deprecated and will be removed " - "in future versions. Please use " - "'pina.solver.physics_informed_solver' instead.", - DeprecationWarning, -) diff --git a/tests/test_blocks/test_convolution.py b/tests/test_block/test_convolution.py similarity index 100% rename from tests/test_blocks/test_convolution.py rename to tests/test_block/test_convolution.py diff --git a/tests/test_blocks/test_embedding.py b/tests/test_block/test_embedding.py similarity index 100% rename from tests/test_blocks/test_embedding.py rename to tests/test_block/test_embedding.py diff --git a/tests/test_blocks/test_fourier.py b/tests/test_block/test_fourier.py similarity index 100% rename from tests/test_blocks/test_fourier.py rename to tests/test_block/test_fourier.py diff --git a/tests/test_blocks/test_low_rank_block.py b/tests/test_block/test_low_rank_block.py similarity index 100% rename from tests/test_blocks/test_low_rank_block.py rename to tests/test_block/test_low_rank_block.py diff --git a/tests/test_blocks/test_orthogonal.py b/tests/test_block/test_orthogonal.py similarity index 100% rename from tests/test_blocks/test_orthogonal.py rename to tests/test_block/test_orthogonal.py diff --git a/tests/test_blocks/test_pirate_network_block.py b/tests/test_block/test_pirate_network_block.py similarity index 100% rename from tests/test_blocks/test_pirate_network_block.py rename to tests/test_block/test_pirate_network_block.py diff --git a/tests/test_blocks/test_pod.py b/tests/test_block/test_pod.py similarity index 100% rename from tests/test_blocks/test_pod.py rename to tests/test_block/test_pod.py diff --git a/tests/test_blocks/test_rbf.py b/tests/test_block/test_rbf.py similarity index 100% rename from tests/test_blocks/test_rbf.py rename to tests/test_block/test_rbf.py diff --git a/tests/test_blocks/test_residual.py b/tests/test_block/test_residual.py similarity index 100% rename from tests/test_blocks/test_residual.py rename to tests/test_block/test_residual.py diff --git a/tests/test_blocks/test_spectral_convolution.py b/tests/test_block/test_spectral_convolution.py similarity index 100% rename from tests/test_blocks/test_spectral_convolution.py rename to tests/test_block/test_spectral_convolution.py diff --git a/tests/test_geometry/test_cartesian.py b/tests/test_domain/test_cartesian.py similarity index 100% rename from tests/test_geometry/test_cartesian.py rename to tests/test_domain/test_cartesian.py diff --git a/tests/test_geometry/test_difference.py b/tests/test_domain/test_difference.py similarity index 100% rename from tests/test_geometry/test_difference.py rename to tests/test_domain/test_difference.py diff --git a/tests/test_geometry/test_ellipsoid.py b/tests/test_domain/test_ellipsoid.py similarity index 100% rename from tests/test_geometry/test_ellipsoid.py rename to tests/test_domain/test_ellipsoid.py diff --git a/tests/test_geometry/test_exclusion.py b/tests/test_domain/test_exclusion.py similarity index 100% rename from tests/test_geometry/test_exclusion.py rename to tests/test_domain/test_exclusion.py diff --git a/tests/test_geometry/test_intersection.py b/tests/test_domain/test_intersection.py similarity index 100% rename from tests/test_geometry/test_intersection.py rename to tests/test_domain/test_intersection.py diff --git a/tests/test_geometry/test_simplex.py b/tests/test_domain/test_simplex.py similarity index 100% rename from tests/test_geometry/test_simplex.py rename to tests/test_domain/test_simplex.py diff --git a/tests/test_geometry/test_union.py b/tests/test_domain/test_union.py similarity index 100% rename from tests/test_geometry/test_union.py rename to tests/test_domain/test_union.py diff --git a/tests/test_equations/test_equation.py b/tests/test_equation/test_equation.py similarity index 100% rename from tests/test_equations/test_equation.py rename to tests/test_equation/test_equation.py diff --git a/tests/test_equations/test_system_equation.py b/tests/test_equation/test_system_equation.py similarity index 100% rename from tests/test_equations/test_system_equation.py rename to tests/test_equation/test_system_equation.py