Skip to content

Commit

Permalink
127 dockter 1 (#128)
Browse files Browse the repository at this point in the history
* #127 Change create_sz to create

* #127 Rename files
  • Loading branch information
docktermj authored Nov 26, 2024
1 parent ad4a3c2 commit d5d8322
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 36 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
40 changes: 20 additions & 20 deletions src/senzing_abstract/szabstractfactory_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
"""
Expand Down
2 changes: 1 addition & 1 deletion src/senzing_abstract/szhelpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
TODO: g2helpers.py
TODO: szhelpers.py
"""

import inspect
Expand Down
30 changes: 15 additions & 15 deletions tests/szabstractfactory_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit d5d8322

Please sign in to comment.