Skip to content

Commit 9c5422d

Browse files
committed
#300 Update documentation headlines
1 parent 32e7a5e commit 9c5422d

4 files changed

Lines changed: 94 additions & 96 deletions

File tree

src/senzing/szconfig.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,104 +33,104 @@ class SzConfig(ABC):
3333
# -------------------------------------------------------------------------
3434

3535
@abstractmethod
36-
def register_data_source(self, data_source_code: str) -> str:
36+
def export(self) -> str:
3737
"""
38-
The `register_data_source` method adds a new data source to this instance.
38+
The `export` method retrieves the definition for this configuration.
3939
4040
Args:
41-
data_source_code (str): Name of data source code to add.
4241
4342
Returns:
44-
str: A string containing a JSON document listing the newly created data source.
43+
str: A string containing a JSON Document representation of the Senzing SzConfig object.
4544
4645
Raises:
4746
TypeError: Incorrect datatype of input parameter.
4847
4948
.. collapse:: Example:
5049
51-
.. literalinclude:: ../../examples/szconfig/register_data_source.py
50+
.. literalinclude:: ../../examples/szconfig/export.py
5251
:linenos:
5352
:language: python
5453
5554
**Output:**
5655
57-
.. literalinclude:: ../../examples/szconfig/register_data_source.txt
56+
.. literalinclude:: ../../examples/szconfig/export.txt
5857
:linenos:
5958
:language: json
6059
"""
6160

6261
@abstractmethod
63-
def unregister_data_source(self, data_source_code: str) -> str:
62+
def get_data_source_registry(self) -> str:
6463
"""
65-
The `unregister_data_source` method deletes a data source from this instance.
64+
The `get_data_source_registry` method gets the data source registry for this configuration.
6665
6766
Args:
68-
data_source_code (str): Name of data source code to delete.
67+
68+
Returns:
69+
str: A string containing a JSON document listing all of the data sources.
6970
7071
Raises:
7172
TypeError: Incorrect datatype of input parameter.
7273
7374
.. collapse:: Example:
7475
75-
.. literalinclude:: ../../examples/szconfig/unregister_data_source.py
76+
.. literalinclude:: ../../examples/szconfig/get_data_source_registry.py
7677
:linenos:
7778
:language: python
7879
7980
**Output:**
8081
81-
.. literalinclude:: ../../examples/szconfig/unregister_data_source.txt
82+
.. literalinclude:: ../../examples/szconfig/get_data_source_registry.txt
8283
:linenos:
8384
:language: json
8485
"""
8586

8687
@abstractmethod
87-
def export(self) -> str:
88+
def register_data_source(self, data_source_code: str) -> str:
8889
"""
89-
The `export` method retrieves the configuration definition for this instance.
90+
The `register_data_source` method adds a data source to this configuration.
9091
9192
Args:
93+
data_source_code (str): Name of data source code to add.
9294
9395
Returns:
94-
str: A string containing a JSON Document representation of the Senzing SzConfig object.
96+
str: A string containing a JSON document listing the newly created data source.
9597
9698
Raises:
9799
TypeError: Incorrect datatype of input parameter.
98100
99101
.. collapse:: Example:
100102
101-
.. literalinclude:: ../../examples/szconfig/export.py
103+
.. literalinclude:: ../../examples/szconfig/register_data_source.py
102104
:linenos:
103105
:language: python
104106
105107
**Output:**
106108
107-
.. literalinclude:: ../../examples/szconfig/export.txt
109+
.. literalinclude:: ../../examples/szconfig/register_data_source.txt
108110
:linenos:
109111
:language: json
110112
"""
111113

112114
@abstractmethod
113-
def get_data_source_registry(self) -> str:
115+
def unregister_data_source(self, data_source_code: str) -> str:
114116
"""
115-
The `get_data_source_registry` method gets the data sources for this instance.
117+
The `unregister_data_source` method removes a data source from this configuration.
116118
117119
Args:
118-
119-
Returns:
120-
str: A string containing a JSON document listing all of the data sources.
120+
data_source_code (str): Name of data source code to delete.
121121
122122
Raises:
123123
TypeError: Incorrect datatype of input parameter.
124124
125125
.. collapse:: Example:
126126
127-
.. literalinclude:: ../../examples/szconfig/get_data_source_registry.py
127+
.. literalinclude:: ../../examples/szconfig/unregister_data_source.py
128128
:linenos:
129129
:language: python
130130
131131
**Output:**
132132
133-
.. literalinclude:: ../../examples/szconfig/get_data_source_registry.txt
133+
.. literalinclude:: ../../examples/szconfig/unregister_data_source.txt
134134
:linenos:
135135
:language: json
136136
"""

src/senzing/szconfigmanager.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def create_config_from_string(self, config_definition: str) -> SzConfig:
9090
@abstractmethod
9191
def create_config_from_template(self) -> SzConfig:
9292
"""
93-
The `create_config_from_template` method Creates a new SzConfig instance
94-
from the template configuration definition.
93+
The `create_config_from_template` method creates a new SzConfig instance from the template
94+
configuration definition.
9595
9696
The template configuration is located at PIPELINE.RESOURCEPATH/templates/g2config.json
9797
@@ -144,7 +144,7 @@ def get_config_registry(self) -> str:
144144
@abstractmethod
145145
def get_default_config_id(self) -> int:
146146
"""
147-
The `get_default_config_id` method gets the default configuration for the repository.
147+
The `get_default_config_id` method gets the default configuration ID for the repository.
148148
149149
Returns:
150150
int: A configuration identifier which identifies the current configuration in use.
@@ -168,7 +168,7 @@ def get_default_config_id(self) -> int:
168168
@abstractmethod
169169
def register_config(self, config_definition: str, config_comment: str) -> int:
170170
"""
171-
The `register_config` method registers a configuration definition with the repository.
171+
The `register_config` method registers a configuration definition in the repository.
172172
173173
Args:
174174
config_definition (str): The Senzing configuration JSON document.
@@ -196,8 +196,8 @@ def register_config(self, config_definition: str, config_comment: str) -> int:
196196
@abstractmethod
197197
def replace_default_config_id(self, current_default_config_id: int, new_default_config_id: int) -> None:
198198
"""
199-
The `replace_default_config_id` method replaces the existing default configuration ID with a new
200-
configuration ID.
199+
The `replace_default_config_id` method replaces the existing default configuration ID with
200+
a new configuration ID.
201201
202202
It is like a "compare-and-swap" instruction to serialize concurrent editing of configuration.
203203
If `current_default_config_id` is no longer the "current configuration identifier", the operation will fail.
@@ -220,7 +220,7 @@ def replace_default_config_id(self, current_default_config_id: int, new_default_
220220
@abstractmethod
221221
def set_default_config(self, config_definition: str, config_comment: str) -> int:
222222
"""
223-
The `set_default_config` method registers a configuration with the repository and sets its ID as the default
223+
The `set_default_config` method registers a configuration in the repository and sets its ID as the default
224224
for the repository.
225225
226226
To serialize modifying of the configuration identifier, see `replace_default_config_id`.
@@ -248,7 +248,7 @@ def set_default_config(self, config_definition: str, config_comment: str) -> int
248248
@abstractmethod
249249
def set_default_config_id(self, config_id: int) -> None:
250250
"""
251-
The `set_default_config_id` method Sets the default configuration ID.
251+
The `set_default_config_id` method sets the default configuration ID.
252252
253253
To serialize modifying of the configuration identifier, see `replace_default_config_id`.
254254

src/senzing/szdiagnostic.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class SzDiagnostic(ABC):
3232
@abstractmethod
3333
def check_repository_performance(self, seconds_to_run: int) -> str:
3434
"""
35-
The `check_repository_performance` method conducts a rudimentary datastore test to gauge I/O performance.
35+
The `check_repository_performance` method conducts a rudimentary repository test to gauge I/O performance.
3636
3737
Args:
3838
seconds_to_run (int): Duration of the test in seconds.
@@ -57,11 +57,15 @@ def check_repository_performance(self, seconds_to_run: int) -> str:
5757
:language: json
5858
"""
5959

60+
# NOTE This is experimental and for internal diagnostics, not to be documented
61+
@abstractmethod
62+
def get_feature(self, feature_id: int) -> str: # pylint: disable=empty-docstring
63+
"""Experimental/internal for Senzing support use only."""
64+
6065
@abstractmethod
6166
def get_repository_info(self) -> str:
6267
"""
63-
The `get_repository_info` method returns overview information about the datastore.
64-
currently in use by Senzing.
68+
The `get_repository_info` method returns overview information about the repository.
6569
6670
Raises:
6771
szexception.SzError:
@@ -79,16 +83,11 @@ def get_repository_info(self) -> str:
7983
:language: json
8084
"""
8185

82-
# NOTE This is experimental and for internal diagnostics, not to be documented
83-
@abstractmethod
84-
def get_feature(self, feature_id: int) -> str: # pylint: disable=empty-docstring
85-
"""Experimental/internal for Senzing support use only."""
86-
8786
@abstractmethod
8887
def purge_repository(self) -> None:
8988
"""
9089
**Warning:**
91-
The `purge_repository` method purges all entity data in the entire repository.
90+
The `purge_repository` method purges all data in the repository, except the configuration.
9291
9392
Before calling `purge_repository` all other instances of the Senzing API
9493
MUST be destroyed or shutdown.

0 commit comments

Comments
 (0)