From 4dcf65777e2d1e731dbd361f0d551127d518aec0 Mon Sep 17 00:00:00 2001 From: "michael@dockter.com" Date: Mon, 7 Jun 2021 21:17:06 -0400 Subject: [PATCH] #3 2.6.0 --- CHANGELOG.md | 6 ++++++ G2ConfigTables.py | 53 ++++++++++++++++++++++------------------------- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aed65a3..6d5a316 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). +## [1.7.0] - 2021-05-17 + +### Added to 1.7.0 + +- Shipped with SenzingAPI 2.6.0 + ## [1.6.0] - 2019-10-16 ### Added to 1.6.0 diff --git a/G2ConfigTables.py b/G2ConfigTables.py index 4a60322..14f14f3 100644 --- a/G2ConfigTables.py +++ b/G2ConfigTables.py @@ -4,12 +4,6 @@ import os import json -#--optional imports -try: import pyodbc -except: pass -try: import sqlite3 -except: pass - #====================== class G2ConfigTables: #====================== @@ -33,32 +27,35 @@ def loadConfig(self, tableName): for rowNode in tableNode: cfgNodeEntry = {} if tableName.upper() == 'CFG_DSRC': - cfgNodeEntry['ID'] = rowNode['DSRC_ID']; - cfgNodeEntry['DSRC_CODE'] = rowNode['DSRC_CODE']; - cfgDict[cfgNodeEntry['DSRC_CODE']] = cfgNodeEntry + cfgNodeEntry['ID'] = rowNode['DSRC_ID']; + cfgNodeEntry['DSRC_CODE'] = rowNode['DSRC_CODE']; + cfgDict[cfgNodeEntry['DSRC_CODE']] = cfgNodeEntry elif tableName.upper() == 'CFG_ETYPE': - cfgNodeEntry['ID'] = rowNode['ETYPE_ID']; - cfgNodeEntry['ETYPE_CODE'] = rowNode['ETYPE_CODE']; - cfgDict[cfgNodeEntry['ETYPE_CODE']] = cfgNodeEntry + cfgNodeEntry['ID'] = rowNode['ETYPE_ID']; + cfgNodeEntry['ETYPE_CODE'] = rowNode['ETYPE_CODE']; + cfgDict[cfgNodeEntry['ETYPE_CODE']] = cfgNodeEntry elif tableName.upper() == 'CFG_FTYPE': - cfgNodeEntry['ID'] = rowNode['FTYPE_ID']; - cfgNodeEntry['FTYPE_CODE'] = rowNode['FTYPE_CODE']; - cfgNodeEntry['DERIVED'] = rowNode['DERIVED']; - cfgDict[cfgNodeEntry['FTYPE_CODE']] = cfgNodeEntry + cfgNodeEntry['ID'] = rowNode['FTYPE_ID']; + cfgNodeEntry['FTYPE_CODE'] = rowNode['FTYPE_CODE']; + cfgNodeEntry['FTYPE_FREQ'] = rowNode['FTYPE_FREQ']; + cfgNodeEntry['FTYPE_EXCL'] = rowNode['FTYPE_EXCL']; + cfgNodeEntry['FTYPE_STAB'] = rowNode['FTYPE_STAB']; + cfgNodeEntry['DERIVED'] = rowNode['DERIVED']; + cfgDict[cfgNodeEntry['FTYPE_CODE']] = cfgNodeEntry elif tableName.upper() == 'CFG_ERRULE': - cfgNodeEntry['ID'] = rowNode['ERRULE_ID']; - cfgNodeEntry['ERRULE_CODE'] = rowNode['ERRULE_CODE']; - cfgNodeEntry['REF_SCORE'] = rowNode['REF_SCORE']; - cfgNodeEntry['RTYPE_ID'] = rowNode['RTYPE_ID']; - cfgDict[cfgNodeEntry['ID']] = cfgNodeEntry + cfgNodeEntry['ID'] = rowNode['ERRULE_ID']; + cfgNodeEntry['ERRULE_CODE'] = rowNode['ERRULE_CODE']; + cfgNodeEntry['REF_SCORE'] = rowNode['REF_SCORE']; + cfgNodeEntry['RTYPE_ID'] = rowNode['RTYPE_ID']; + cfgDict[cfgNodeEntry['ID']] = cfgNodeEntry elif tableName.upper() == 'CFG_ATTR': - cfgNodeEntry['ATTR_ID'] = rowNode['ATTR_ID']; - cfgNodeEntry['ATTR_CODE'] = rowNode['ATTR_CODE']; - cfgNodeEntry['ATTR_CLASS'] = rowNode['ATTR_CLASS']; - cfgNodeEntry['FTYPE_CODE'] = rowNode['FTYPE_CODE']; - cfgNodeEntry['FELEM_CODE'] = rowNode['FELEM_CODE']; - cfgNodeEntry['FELEM_REQ'] = rowNode['FELEM_REQ']; - cfgDict[cfgNodeEntry['ATTR_CODE']] = cfgNodeEntry + cfgNodeEntry['ATTR_ID'] = rowNode['ATTR_ID']; + cfgNodeEntry['ATTR_CODE'] = rowNode['ATTR_CODE']; + cfgNodeEntry['ATTR_CLASS'] = rowNode['ATTR_CLASS']; + cfgNodeEntry['FTYPE_CODE'] = rowNode['FTYPE_CODE']; + cfgNodeEntry['FELEM_CODE'] = rowNode['FELEM_CODE']; + cfgNodeEntry['FELEM_REQ'] = rowNode['FELEM_REQ']; + cfgDict[cfgNodeEntry['ATTR_CODE']] = cfgNodeEntry else: return None return cfgDict