1414# Metadata
1515
1616__all__ = ["SzConfigManager" ]
17- __version__ = "0 .0.1" # See https://www.python.org/dev/peps/pep-0396/
18- __date__ = "2023-10-30 "
19- __updated__ = "2023-11-08 "
17+ __version__ = "4 .0.0"
18+ __date__ = "2025-08-05 "
19+ __updated__ = "2025-08-05 "
2020
2121# -----------------------------------------------------------------------------
2222# SzConfigManager
@@ -93,8 +93,6 @@ def create_config_from_template(self) -> SzConfig:
9393 The `create_config_from_template` method creates a new SzConfig instance from the template
9494 configuration definition.
9595
96- The template configuration is located at PIPELINE.RESOURCEPATH/templates/g2config.json
97-
9896 Args:
9997 config_definition (str): The Senzing configuration JSON document.
10098
@@ -122,6 +120,11 @@ def get_config_registry(self) -> str:
122120 """
123121 The `get_config_registry` method gets the configuration registry.
124122
123+ The registry contains the original timestamp, original comment, and configuration ID
124+ of all configurations ever registered with the repository.
125+
126+ Registered configurations cannot be unregistered.
127+
125128 Returns:
126129 str: A JSON document containing Senzing configurations.
127130
@@ -146,8 +149,12 @@ def get_default_config_id(self) -> int:
146149 """
147150 The `get_default_config_id` method gets the default configuration ID for the repository.
148151
152+ Unless an explicit configuration ID is specified at initialization, the default configuration ID is used.
153+
154+ This may not be the same as the active configuration ID.
155+
149156 Returns:
150- int: A configuration identifier which identifies the current configuration in use .
157+ int: The current default configuration ID or zero if the default configuration has not been set .
151158
152159 Raises:
153160 TypeError: Incorrect datatype of input parameter.
@@ -170,6 +177,10 @@ def register_config(self, config_definition: str, config_comment: str) -> int:
170177 """
171178 The `register_config` method registers a configuration definition in the repository.
172179
180+ Registered configurations do not become immediately active nor do they become the default.
181+
182+ Registered configurations cannot be unregistered.
183+
173184 Args:
174185 config_definition (str): The Senzing configuration JSON document.
175186 config_comment (str): free-form string of comments describing the configuration document.
@@ -199,9 +210,9 @@ def replace_default_config_id(self, current_default_config_id: int, new_default_
199210 The `replace_default_config_id` method replaces the existing default configuration ID with
200211 a new configuration ID.
201212
202- It is like a "compare-and-swap" instruction to serialize concurrent editing of configuration .
203- If `current_default_config_id` is no longer the "current configuration identifier", the operation will fail.
204- To simply set the default configuration ID, use `set_default_config_id` .
213+ The change is prevented if the current default configuration ID value is not as expected .
214+
215+ Use this in place of set_default_config_id() to handle race conditions .
205216
206217 Args:
207218 current_default_config_id (int): The configuration identifier to replace.
@@ -223,7 +234,7 @@ def set_default_config(self, config_definition: str, config_comment: str) -> int
223234 The `set_default_config` method registers a configuration in the repository and sets its ID as the default
224235 for the repository.
225236
226- To serialize modifying of the configuration identifier, see `replace_default_config_id` .
237+ Convenience method for register_config() followed by set_default_config_id() .
227238
228239 Args:
229240 config_definition (str): The Senzing configuration JSON document.
@@ -250,7 +261,9 @@ def set_default_config_id(self, config_id: int) -> None:
250261 """
251262 The `set_default_config_id` method sets the default configuration ID.
252263
253- To serialize modifying of the configuration identifier, see `replace_default_config_id`.
264+ Usually this method is sufficient for setting the default configuration ID.
265+ However in concurrent environments that could encounter race conditions,
266+ consider using replace_default_config_id() instead.
254267
255268 Args:
256269 config_id (int): The configuration identifier of the Senzing Engine configuration to use as the default.
0 commit comments