diff --git a/g2/python/G2ConfigTool.py b/g2/python/G2ConfigTool.py index 2add569..21e2f44 100755 --- a/g2/python/G2ConfigTool.py +++ b/g2/python/G2ConfigTool.py @@ -4089,53 +4089,45 @@ def do_templateAdd(self, arg): validTemplates = {} - validTemplates['GLOBAL_ID'] = { - 'DESCRIPTION': 'globally unique identifier (like an ssn, a credit card, or a medicare_id)', - 'BEHAVIOR': ['F1', 'F1E', 'F1ES'], - 'CANDIDATES': ['No'], - 'STANDARDIZE': ['PARSE_ID'], - 'EXPRESSION': ['EXPRESS_ID'], - 'COMPARISON': ['ID_COMP', 'EXACT_COMP'], - 'FEATURE_CLASS': 'ISSUED_ID', - 'ATTRIBUTE_CLASS': 'IDENTIFIER', - 'ELEMENTS': [{'element': 'ID_NUM', 'expressed': 'No', 'compared': 'no', 'display': 'Yes'}, - {'element': 'ID_NUM_STD', 'expressed': 'Yes', 'compared': 'yes', 'display': 'No'}], - 'ATTRIBUTES': [{'attribute': '', 'element': 'ID_NUM', 'required': 'Yes'}]} + validTemplates['GLOBAL_ID'] = {'DESCRIPTION': 'globally unique identifier (like an ssn, a credit card, or a medicare_id)', + 'BEHAVIOR': ['F1', 'F1E', 'F1ES', 'A1', 'A1E', 'A1ES'], + 'CANDIDATES': ['No'], + 'STANDARDIZE': ['PARSE_ID'], + 'EXPRESSION': ['EXPRESS_ID'], + 'COMPARISON': ['ID_COMP', 'EXACT_COMP'], + 'FEATURE_CLASS': 'ISSUED_ID', + 'ATTRIBUTE_CLASS': 'IDENTIFIER', + 'ELEMENTS': [{'element': 'ID_NUM', 'expressed': 'No', 'compared': 'no', 'display': 'Yes'}, + {'element': 'ID_NUM_STD', 'expressed': 'Yes', 'compared': 'yes', 'display': 'No'}], + 'ATTRIBUTES': [{'attribute': '', 'element': 'ID_NUM', 'required': 'Yes'}]} validTemplates['STATE_ID'] = {'DESCRIPTION': 'state issued identifier (like a drivers license)', - 'BEHAVIOR': ['F1', 'F1E', 'F1ES'], + 'BEHAVIOR': ['F1', 'F1E', 'F1ES', 'A1', 'A1E', 'A1ES'], 'CANDIDATES': ['No'], 'STANDARDIZE': ['PARSE_ID'], 'EXPRESSION': ['EXPRESS_ID'], 'COMPARISON': ['ID_COMP'], 'FEATURE_CLASS': 'ISSUED_ID', 'ATTRIBUTE_CLASS': 'IDENTIFIER', - 'ELEMENTS': [ - {'element': 'ID_NUM', 'expressed': 'No', 'compared': 'no', 'display': 'Yes'}, - {'element': 'STATE', 'expressed': 'No', 'compared': 'yes', 'display': 'Yes'}, - {'element': 'ID_NUM_STD', 'expressed': 'Yes', 'compared': 'yes', - 'display': 'No'}], - 'ATTRIBUTES': [ - {'attribute': '_NUMBER', 'element': 'ID_NUM', 'required': 'Yes'}, - {'attribute': '_STATE', 'element': 'STATE', 'required': 'No'}]} + 'ELEMENTS': [{'element': 'ID_NUM', 'expressed': 'No', 'compared': 'no', 'display': 'Yes'}, + {'element': 'STATE', 'expressed': 'No', 'compared': 'yes', 'display': 'Yes'}, + {'element': 'ID_NUM_STD', 'expressed': 'Yes', 'compared': 'yes', 'display': 'No'}], + 'ATTRIBUTES': [{'attribute': '_NUMBER', 'element': 'ID_NUM', 'required': 'Yes'}, + {'attribute': '_STATE', 'element': 'STATE', 'required': 'No'}]} validTemplates['COUNTRY_ID'] = {'DESCRIPTION': 'country issued identifier (like a passport)', - 'BEHAVIOR': ['F1', 'F1E', 'F1ES'], + 'BEHAVIOR': ['F1', 'F1E', 'F1ES', 'A1', 'A1E', 'A1ES'], 'CANDIDATES': ['No'], 'STANDARDIZE': ['PARSE_ID'], 'EXPRESSION': ['EXPRESS_ID'], 'COMPARISON': ['ID_COMP'], 'FEATURE_CLASS': 'ISSUED_ID', 'ATTRIBUTE_CLASS': 'IDENTIFIER', - 'ELEMENTS': [{'element': 'ID_NUM', 'expressed': 'No', 'compared': 'no', - 'display': 'Yes'}, - {'element': 'COUNTRY', 'expressed': 'No', 'compared': 'yes', - 'display': 'Yes'}, - {'element': 'ID_NUM_STD', 'expressed': 'Yes', 'compared': 'yes', - 'display': 'No'}], - 'ATTRIBUTES': [ - {'attribute': '_NUMBER', 'element': 'ID_NUM', 'required': 'Yes'}, - {'attribute': '_COUNTRY', 'element': 'COUNTRY', 'required': 'No'}]} + 'ELEMENTS': [{'element': 'ID_NUM', 'expressed': 'No', 'compared': 'no', 'display': 'Yes'}, + {'element': 'COUNTRY', 'expressed': 'No', 'compared': 'yes', 'display': 'Yes'}, + {'element': 'ID_NUM_STD', 'expressed': 'Yes', 'compared': 'yes', 'display': 'No'}], + 'ATTRIBUTES': [{'attribute': '_NUMBER', 'element': 'ID_NUM', 'required': 'Yes'}, + {'attribute': '_COUNTRY', 'element': 'COUNTRY', 'required': 'No'}]} if arg and arg.upper() == 'LIST': print() diff --git a/g2/python/G2Loader.py b/g2/python/G2Loader.py index ef7bc7d..dbbe635 100755 --- a/g2/python/G2Loader.py +++ b/g2/python/G2Loader.py @@ -30,9 +30,9 @@ from senzing import G2Config, G2ConfigMgr, G2Diagnostic, G2Engine, G2Exception, G2Product, G2ModuleLicenseException __all__ = [] -__version__ = '2.2.0' # See https://www.python.org/dev/peps/pep-0396/ +__version__ = '2.2.2' # See https://www.python.org/dev/peps/pep-0396/ __date__ = '2018-09-18' -__updated__ = '2022-08-26' +__updated__ = '2022-10-11' # ----------------------------------------------------------------------------- # Exceptions diff --git a/g2/python/G2Paths.py b/g2/python/G2Paths.py index c57fc70..673498f 100644 --- a/g2/python/G2Paths.py +++ b/g2/python/G2Paths.py @@ -5,20 +5,24 @@ # The Senzing python tools call G2Paths before starting engine to locate the engine configuration. Error if can't locate # a G2Module.ini or SENZING_ENGINE_CONFIGURATION_JSON -if 'SENZING_ETC_PATH' not in os.environ and 'SENZING_ROOT' not in os.environ and 'SENZING_ENGINE_CONFIGURATION_JSON' not in os.environ: - - print(textwrap.dedent('''\n\ - ERROR: SENZING_ROOT or SENZING_ENGINE_CONFIGURATION_JSON environment variable is not set: - - - If using a Senzing project on a bare metal install, source the setupEnv file in the project root path. - - https://senzing.zendesk.com/hc/en-us/articles/115002408867-Introduction-G2-Quickstart - - - If running within a container set the SENZING_ENGINE_CONFIGURATION_JSON environment variable. - - https://github.com/Senzing/knowledge-base/blob/main/lists/environment-variables.md#senzing_engine_configuration_json - ''')) - sys.exit(1) +if 'SENZING_ETC_PATH' not in os.environ and 'SENZING_ROOT' not in os.environ: + + # Check if set or not and that it's not set to null + secj = os.environ.get('SENZING_ENGINE_CONFIGURATION_JSON') + if not secj or (secj and len(secj) == 0): + + print(textwrap.dedent('''\n\ + ERROR: SENZING_ROOT or SENZING_ENGINE_CONFIGURATION_JSON environment variable is not set: + + - If using a Senzing project on a bare metal install, source the setupEnv file in the project root path. + + https://senzing.zendesk.com/hc/en-us/articles/115002408867-Introduction-G2-Quickstart + + - If running within a container set the SENZING_ENGINE_CONFIGURATION_JSON environment variable. + + https://github.com/Senzing/knowledge-base/blob/main/lists/environment-variables.md#senzing_engine_configuration_json + ''')) + sys.exit(1) # Search paths checked for INI file requested. Path can be for a local Senzing project # (created with G2CreateProject.py) or a 'system install' path - for example using an diff --git a/g2command b/g2command index 33437ab..0c16bee 160000 --- a/g2command +++ b/g2command @@ -1 +1 @@ -Subproject commit 33437abceb805cb4862b35de990e61ca902c18e7 +Subproject commit 0c16beed8c29e5ad1683897f9159c470c1168593 diff --git a/g2configtool b/g2configtool index d4acab7..da18130 160000 --- a/g2configtool +++ b/g2configtool @@ -1 +1 @@ -Subproject commit d4acab7384cea2dc5d118f2facca72c9a8c2d9f4 +Subproject commit da18130deb408c213e9d8af7b41020e76e66bf52 diff --git a/g2loader b/g2loader index 9ad8de8..4a25a81 160000 --- a/g2loader +++ b/g2loader @@ -1 +1 @@ -Subproject commit 9ad8de83304420a2b9346cf634bf6e46e3ac8451 +Subproject commit 4a25a814bea2d039993375d81ebdcadc819848f8 diff --git a/g2paths b/g2paths index b09ba77..15ede3e 160000 --- a/g2paths +++ b/g2paths @@ -1 +1 @@ -Subproject commit b09ba778287254fdc59ee251eb38985cd4158e6a +Subproject commit 15ede3e6f645de55040e060e42b7c2a829526dca