From e30089292ac1af2fabc599e948563beced887fd4 Mon Sep 17 00:00:00 2001 From: docktermj Date: Tue, 26 Nov 2024 18:25:02 -0500 Subject: [PATCH 1/2] #127 Change create_sz to create --- CHANGELOG.md | 6 +++ .../szabstractfactory_abstract.py | 40 +++++++++---------- src/senzing_abstract/szhelpers.py | 2 +- tests/szabstractfactory_test.py | 30 +++++++------- 4 files changed, 42 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1307f0..dc60371 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning]. ## [Unreleased] +## [0.1.11] - 2024-11-26 + +### Changed in 0.1.11 + +- In SzAbstractFactory, changed `create_sz_*` to `create_*` + ## [0.1.10] - 2024-11-01 ### Changed in 0.1.10 diff --git a/src/senzing_abstract/szabstractfactory_abstract.py b/src/senzing_abstract/szabstractfactory_abstract.py index 272dc17..467d00a 100644 --- a/src/senzing_abstract/szabstractfactory_abstract.py +++ b/src/senzing_abstract/szabstractfactory_abstract.py @@ -38,9 +38,9 @@ class SzAbstractFactoryAbstract(ABC): # ------------------------------------------------------------------------- @abstractmethod - def create_sz_config(self, **kwargs: Any) -> SzConfigAbstract: + def create_config(self, **kwargs: Any) -> SzConfigAbstract: """ - The `create_sz_config` method creates a new implementation of an `SzConfigAbstract` object. + The `create_config` method creates a new implementation of an `SzConfigAbstract` object. Args: @@ -51,21 +51,21 @@ def create_sz_config(self, **kwargs: Any) -> SzConfigAbstract: .. collapse:: Example: - .. literalinclude:: ../../examples/szabstractfactory/create_sz_config.py + .. literalinclude:: ../../examples/szabstractfactory/create_config.py :linenos: :language: python **Output:** - .. literalinclude:: ../../examples/szabstractfactory/create_sz_config.txt + .. literalinclude:: ../../examples/szabstractfactory/create_config.txt :linenos: :language: json """ @abstractmethod - def create_sz_configmanager(self, **kwargs: Any) -> SzConfigManagerAbstract: + def create_configmanager(self, **kwargs: Any) -> SzConfigManagerAbstract: """ - The `create_sz_configmanager` method creates a new implementation of an `SzConfigManagerAbstract` object. + The `create_configmanager` method creates a new implementation of an `SzConfigManagerAbstract` object. Args: @@ -76,21 +76,21 @@ def create_sz_configmanager(self, **kwargs: Any) -> SzConfigManagerAbstract: .. collapse:: Example: - .. literalinclude:: ../../examples/szabstractfactory/create_sz_configmanager.py + .. literalinclude:: ../../examples/szabstractfactory/create_configmanager.py :linenos: :language: python **Output:** - .. literalinclude:: ../../examples/szabstractfactory/create_sz_configmanager.txt + .. literalinclude:: ../../examples/szabstractfactory/create_configmanager.txt :linenos: :language: json """ @abstractmethod - def create_sz_diagnostic(self, **kwargs: Any) -> SzDiagnosticAbstract: + def create_diagnostic(self, **kwargs: Any) -> SzDiagnosticAbstract: """ - The `create_sz_diagnostic` method creates a new implementation of an `SzDiagnosticAbstract` object. + The `create_diagnostic` method creates a new implementation of an `SzDiagnosticAbstract` object. Args: @@ -101,21 +101,21 @@ def create_sz_diagnostic(self, **kwargs: Any) -> SzDiagnosticAbstract: .. collapse:: Example: - .. literalinclude:: ../../examples/szabstractfactory/create_sz_diagnostic.py + .. literalinclude:: ../../examples/szabstractfactory/create_diagnostic.py :linenos: :language: python **Output:** - .. literalinclude:: ../../examples/szabstractfactory/create_sz_diagnostic.txt + .. literalinclude:: ../../examples/szabstractfactory/create_diagnostic.txt :linenos: :language: json """ @abstractmethod - def create_sz_engine(self, **kwargs: Any) -> SzEngineAbstract: + def create_engine(self, **kwargs: Any) -> SzEngineAbstract: """ - The `create_sz_engine` method creates a new implementation of an `SzEngineAbstract` object. + The `create_engine` method creates a new implementation of an `SzEngineAbstract` object. Args: @@ -126,21 +126,21 @@ def create_sz_engine(self, **kwargs: Any) -> SzEngineAbstract: .. collapse:: Example: - .. literalinclude:: ../../examples/szabstractfactory/create_sz_engine.py + .. literalinclude:: ../../examples/szabstractfactory/create_engine.py :linenos: :language: python **Output:** - .. literalinclude:: ../../examples/szabstractfactory/create_sz_engine.txt + .. literalinclude:: ../../examples/szabstractfactory/create_engine.txt :linenos: :language: json """ @abstractmethod - def create_sz_product(self, **kwargs: Any) -> SzProductAbstract: + def create_product(self, **kwargs: Any) -> SzProductAbstract: """ - The `create_sz_product` method creates a new implementation of an `SzProductAbstract` object. + The `create_product` method creates a new implementation of an `SzProductAbstract` object. Args: @@ -151,13 +151,13 @@ def create_sz_product(self, **kwargs: Any) -> SzProductAbstract: .. collapse:: Example: - .. literalinclude:: ../../examples/szabstractfactory/create_sz_product.py + .. literalinclude:: ../../examples/szabstractfactory/create_product.py :linenos: :language: python **Output:** - .. literalinclude:: ../../examples/szabstractfactory/create_sz_product.txt + .. literalinclude:: ../../examples/szabstractfactory/create_product.txt :linenos: :language: json """ diff --git a/src/senzing_abstract/szhelpers.py b/src/senzing_abstract/szhelpers.py index fff9592..0d8c4a3 100644 --- a/src/senzing_abstract/szhelpers.py +++ b/src/senzing_abstract/szhelpers.py @@ -1,5 +1,5 @@ """ -TODO: g2helpers.py +TODO: szhelpers.py """ import inspect diff --git a/tests/szabstractfactory_test.py b/tests/szabstractfactory_test.py index b3ae0c1..732455c 100755 --- a/tests/szabstractfactory_test.py +++ b/tests/szabstractfactory_test.py @@ -27,33 +27,33 @@ # ----------------------------------------------------------------------------- -def test_create_sz_config(szabstractfactory: SzAbstractFactoryAbstract) -> None: +def test_create_config(szabstractfactory: SzAbstractFactoryAbstract) -> None: """Test SzConfig().add_data_source().""" - actual = szabstractfactory.create_sz_config() + actual = szabstractfactory.create_config() assert isinstance(actual, SzConfigAbstract) -def test_create_sz_configmanager(szabstractfactory: SzAbstractFactoryAbstract) -> None: +def test_create_configmanager(szabstractfactory: SzAbstractFactoryAbstract) -> None: """Test SzConfig().add_data_source().""" - actual = szabstractfactory.create_sz_configmanager() + actual = szabstractfactory.create_configmanager() assert isinstance(actual, SzConfigManagerAbstract) -def test_create_sz_diagnostic(szabstractfactory: SzAbstractFactoryAbstract) -> None: +def test_create_diagnostic(szabstractfactory: SzAbstractFactoryAbstract) -> None: """Test SzConfig().add_data_source().""" - actual = szabstractfactory.create_sz_diagnostic() + actual = szabstractfactory.create_diagnostic() assert isinstance(actual, SzDiagnosticAbstract) -def test_create_sz_engine(szabstractfactory: SzAbstractFactoryAbstract) -> None: +def test_create_engine(szabstractfactory: SzAbstractFactoryAbstract) -> None: """Test SzConfig().add_data_source().""" - actual = szabstractfactory.create_sz_engine() + actual = szabstractfactory.create_engine() assert isinstance(actual, SzEngineAbstract) -def test_create_sz_product(szabstractfactory: SzAbstractFactoryAbstract) -> None: +def test_create_product(szabstractfactory: SzAbstractFactoryAbstract) -> None: """Test SzConfig().add_data_source().""" - actual = szabstractfactory.create_sz_product() + actual = szabstractfactory.create_product() assert isinstance(actual, SzProductAbstract) @@ -84,23 +84,23 @@ class SzAbstractFactoryTest(SzAbstractFactoryAbstract): # SzAbstractFactory methods # ------------------------------------------------------------------------- - def create_sz_config(self, **kwargs: Any) -> SzConfigAbstract: + def create_config(self, **kwargs: Any) -> SzConfigAbstract: _ = kwargs return SzConfigTest() - def create_sz_configmanager(self, **kwargs: Any) -> SzConfigManagerAbstract: + def create_configmanager(self, **kwargs: Any) -> SzConfigManagerAbstract: _ = kwargs return SzConfigManagerTest() - def create_sz_diagnostic(self, **kwargs: Any) -> SzDiagnosticAbstract: + def create_diagnostic(self, **kwargs: Any) -> SzDiagnosticAbstract: _ = kwargs return SzDiagnosticTest() - def create_sz_engine(self, **kwargs: Any) -> SzEngineAbstract: + def create_engine(self, **kwargs: Any) -> SzEngineAbstract: _ = kwargs return SzEngineTest() - def create_sz_product(self, **kwargs: Any) -> SzProductAbstract: + def create_product(self, **kwargs: Any) -> SzProductAbstract: _ = kwargs return SzProductTest() From 2e58e35330aab71498ab65c595e7b6a1a432d50a Mon Sep 17 00:00:00 2001 From: docktermj Date: Tue, 26 Nov 2024 18:27:50 -0500 Subject: [PATCH 2/2] #127 Rename files --- .../szabstractfactory/{create_sz_config.py => create_config.py} | 0 .../szabstractfactory/{create_sz_config.txt => create_config.txt} | 0 .../{create_sz_configmanager.py => create_configmanager.py} | 0 .../{create_sz_configmanager.txt => create_configmanager.txt} | 0 .../{create_sz_diagnostic.py => create_diagnostic.py} | 0 .../{create_sz_diagnostic.txt => create_diagnostic.txt} | 0 .../szabstractfactory/{create_sz_engine.py => create_engine.py} | 0 .../szabstractfactory/{create_sz_engine.txt => create_engine.txt} | 0 .../szabstractfactory/{create_sz_product.py => create_product.py} | 0 .../{create_sz_product.txt => create_product.txt} | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename examples/szabstractfactory/{create_sz_config.py => create_config.py} (100%) rename examples/szabstractfactory/{create_sz_config.txt => create_config.txt} (100%) rename examples/szabstractfactory/{create_sz_configmanager.py => create_configmanager.py} (100%) rename examples/szabstractfactory/{create_sz_configmanager.txt => create_configmanager.txt} (100%) rename examples/szabstractfactory/{create_sz_diagnostic.py => create_diagnostic.py} (100%) rename examples/szabstractfactory/{create_sz_diagnostic.txt => create_diagnostic.txt} (100%) rename examples/szabstractfactory/{create_sz_engine.py => create_engine.py} (100%) rename examples/szabstractfactory/{create_sz_engine.txt => create_engine.txt} (100%) rename examples/szabstractfactory/{create_sz_product.py => create_product.py} (100%) rename examples/szabstractfactory/{create_sz_product.txt => create_product.txt} (100%) diff --git a/examples/szabstractfactory/create_sz_config.py b/examples/szabstractfactory/create_config.py similarity index 100% rename from examples/szabstractfactory/create_sz_config.py rename to examples/szabstractfactory/create_config.py diff --git a/examples/szabstractfactory/create_sz_config.txt b/examples/szabstractfactory/create_config.txt similarity index 100% rename from examples/szabstractfactory/create_sz_config.txt rename to examples/szabstractfactory/create_config.txt diff --git a/examples/szabstractfactory/create_sz_configmanager.py b/examples/szabstractfactory/create_configmanager.py similarity index 100% rename from examples/szabstractfactory/create_sz_configmanager.py rename to examples/szabstractfactory/create_configmanager.py diff --git a/examples/szabstractfactory/create_sz_configmanager.txt b/examples/szabstractfactory/create_configmanager.txt similarity index 100% rename from examples/szabstractfactory/create_sz_configmanager.txt rename to examples/szabstractfactory/create_configmanager.txt diff --git a/examples/szabstractfactory/create_sz_diagnostic.py b/examples/szabstractfactory/create_diagnostic.py similarity index 100% rename from examples/szabstractfactory/create_sz_diagnostic.py rename to examples/szabstractfactory/create_diagnostic.py diff --git a/examples/szabstractfactory/create_sz_diagnostic.txt b/examples/szabstractfactory/create_diagnostic.txt similarity index 100% rename from examples/szabstractfactory/create_sz_diagnostic.txt rename to examples/szabstractfactory/create_diagnostic.txt diff --git a/examples/szabstractfactory/create_sz_engine.py b/examples/szabstractfactory/create_engine.py similarity index 100% rename from examples/szabstractfactory/create_sz_engine.py rename to examples/szabstractfactory/create_engine.py diff --git a/examples/szabstractfactory/create_sz_engine.txt b/examples/szabstractfactory/create_engine.txt similarity index 100% rename from examples/szabstractfactory/create_sz_engine.txt rename to examples/szabstractfactory/create_engine.txt diff --git a/examples/szabstractfactory/create_sz_product.py b/examples/szabstractfactory/create_product.py similarity index 100% rename from examples/szabstractfactory/create_sz_product.py rename to examples/szabstractfactory/create_product.py diff --git a/examples/szabstractfactory/create_sz_product.txt b/examples/szabstractfactory/create_product.txt similarity index 100% rename from examples/szabstractfactory/create_sz_product.txt rename to examples/szabstractfactory/create_product.txt