From b361e7105360e6b7b9be2efc6710e4c94ac0cc96 Mon Sep 17 00:00:00 2001 From: jaeadams Date: Mon, 16 May 2022 11:42:59 -0600 Subject: [PATCH] #132 Update G2Command and G2Project submodules. --- CHANGELOG.md | 6 ++++++ g2/python/G2Command.py | 21 +++++++++++++++++++++ g2/python/G2Project.py | 6 ++---- g2command | 2 +- g2project | 2 +- 5 files changed, 31 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16be828..2a1d01a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), [markdownlint](https://dlaa.me/markdownlint/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.0.2] - 2022-05-16 + +### Added to 3.0.2 + +- Updates to G2Command and G2Project submodules. + ## [3.0.1] - 2022-05-09 ### Added to 3.0.1 diff --git a/g2/python/G2Command.py b/g2/python/G2Command.py index 0d5bdf7..c173514 100755 --- a/g2/python/G2Command.py +++ b/g2/python/G2Command.py @@ -1761,6 +1761,27 @@ def do_countRedoRecords(self, arg): except G2Exception as err: print(err) + + def do_getRedoRecord(self, arg): + '\nGet a redo record from the redo queue: getRedoRecord\n' + + try: + args = self.parser.parse_args(['noArgument'] + parse(arg)) + except SystemExit: + print(self.do_getRedoRecord.__doc__) + return + + try: + response = bytearray() + self.g2_module.getRedoRecord(response) + if response: + print('response: {}'.format(response.decode())) + else: + print('\nNo response!\n') + except G2Exception as err: + print(err) + + def do_processRedoRecord(self, arg): '\nProcess a redo record: processRedoRecord\n' diff --git a/g2/python/G2Project.py b/g2/python/G2Project.py index 1e6da6e..5882b61 100644 --- a/g2/python/G2Project.py +++ b/g2/python/G2Project.py @@ -25,7 +25,6 @@ def __init__(self, g2ConfigTables, dsrcAction, projectFileName=None, projectFile self.mappingFiles = {} self.dataSourceDict = g2ConfigTables.loadConfig('CFG_DSRC') - self.entityTypeDict = g2ConfigTables.loadConfig('CFG_ETYPE') self.featureDict = g2ConfigTables.loadConfig('CFG_FTYPE') self.attributeDict = g2ConfigTables.loadConfig('CFG_ATTR') @@ -257,8 +256,6 @@ def testJsonRecord(self, jsonDict, rowNum, sourceDict): # --so if the data source was not specified for the file its in the json record and needs to be validated elif 'DATA_SOURCE' not in sourceDict and jsonDict['DATA_SOURCE'].upper() not in self.dataSourceDict: messageList.append(['ERROR', 'Invalid data source: ' + jsonDict['DATA_SOURCE'].upper()]) - if 'ENTITY_TYPE' in jsonDict and jsonDict['ENTITY_TYPE'].upper() not in self.entityTypeDict: - messageList.append(['ERROR', 'Invalid entity type: ' + jsonDict['ENTITY_TYPE'].upper()]) # --record_id if 'RECORD_ID' not in jsonDict: @@ -555,7 +552,7 @@ def loadProjectFile(self, projectFileName): def loadJsonProject(self): ''' validates and loads a json project file into memory ''' try: - projectData = json.load(open(self.projectFileName), encoding="utf-8") + projectData = json.load(open(self.projectFileName, encoding="utf-8")) except Exception as err: print('ERROR: project file ' + repr(err)) self.success = False @@ -870,3 +867,4 @@ def renderTable(self, tableInfo, tableData): print(hdrFormat.format(*headerRow2)) for row in tableData: print(rowFormat.format(*row)) + diff --git a/g2command b/g2command index 9c873fb..bfe11da 160000 --- a/g2command +++ b/g2command @@ -1 +1 @@ -Subproject commit 9c873fbce4c1a383829c774dfa5b6c30a701dc55 +Subproject commit bfe11dab9adef6cb7fb930ed764340b44c3cb494 diff --git a/g2project b/g2project index 0a1bbd7..269400a 160000 --- a/g2project +++ b/g2project @@ -1 +1 @@ -Subproject commit 0a1bbd738341f11d8ac601dea992fbffa496cd37 +Subproject commit 269400aea20e7afdc9d0b4a69af156a4a13f9915