Skip to content

Commit

Permalink
Merge pull request #133 from Senzing/issue-132.jae.1
Browse files Browse the repository at this point in the history
#132 Update G2Command and G2Project submodules.
  • Loading branch information
jaeadams authored May 18, 2022
2 parents 14cc633 + b361e71 commit 925501d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions g2/python/G2Command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
6 changes: 2 additions & 4 deletions g2/python/G2Project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -870,3 +867,4 @@ def renderTable(self, tableInfo, tableData):
print(hdrFormat.format(*headerRow2))
for row in tableData:
print(rowFormat.format(*row))

2 changes: 1 addition & 1 deletion g2command
2 changes: 1 addition & 1 deletion g2project

0 comments on commit 925501d

Please sign in to comment.