bug fix with installer

This commit is contained in:
Steve Nyemba 2019-11-07 01:07:15 -06:00
parent b4c1e1a8c2
commit 69998cc2e1
2 changed files with 32 additions and 22 deletions

View File

@ -74,7 +74,7 @@ def format_proc(value):
else:
return value
def map(row,config,version):
def get_map(row,config,version):
label = config['label'] if 'label' in config else None
@ -107,7 +107,7 @@ def map(row,config,version):
# we are dealing with a complex object
object_value = []
for row_item in row :
object_value.append( list(map(row_item,config,version)))
object_value.append( list(get_map(row_item,config,version)))
# object_value = {label:object_value}
return object_value
@ -145,7 +145,7 @@ def get_content(filename,config,section=None) :
row = split(x12_file[3])
_info = get_config(config,row)
_default_value = list(map(row,_info,VERSION)) if _info else None
_default_value = get_map(row,_info,VERSION) if _info else None
N = len(locations)
for index in range(0,N-1):
@ -157,7 +157,8 @@ def get_content(filename,config,section=None) :
_info = get_config(config,row)
if _info :
try:
tmp = map(row,_info,VERSION)
# tmp = get_map(row,_info,VERSION)
tmp = get_map(row,_info,VERSION)
except Exception as e:
if sys.verion_info[0] > 2 :
logs.append ({"version":VERSION,"filename":filename,"msg":e.args[0],"X12":x12_file[beg:end]})

View File

@ -3,23 +3,32 @@ This is a build file for the
"""
from setuptools import setup, find_packages
import os
import sys
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "parse-edi",
version = "1.0.1",
author = "Vanderbilt University Medical Center",
author_email = "steve.l.nyemba@vanderbilt.edu",
license = "MIT",
packages=['edi'],
keywords=['healthcare', 'edi','x12','mongodb','couchdb','rabbitmq','file','read','write','s3'],
install_requires = [
'data-transport@git+https://dev.the-phi.com/git/steve/data-transport.git',
'pymongo','numpy','cloudant','pika','boto','flask-session','smart_open'],
url="https://hiplab.mc.vanderbilt.edu/tools",
use_2to3=True,
long_description=read('README.md'),
convert_2to3_doctests=['README.md'],
#use_2to3_fixers=['your.fixers'],
use_2to3_exclude_fixers=['lib2to3.fixes.fix_import'],
)
args = {"name":"parse-edi","version":"1.0.0","author":"Vanderbilt University Medical Center","license":"MIT","packages":["edi"],"keywords":["healthcare","edi","x12","data","transport","protocol"]}
args["install_requires"] = ['data-transport@git+https://dev.the-phi.com/git/steve/data-transport.git','pymongo','numpy','cloudant','pika','boto','flask-session','smart_open']
args['url'] = 'https://hiplab.mc.vanderbilt.edu'
if sys.version_info[0] == 2 :
args['use_2to3'] = False
args['use_2to3_exclude_fixers'] = ['lib2to3.fixes.fix_import']
setup(**args)
#setup(
# name = "parse-edi",
# version = "1.0",
# author = "Vanderbilt University Medical Center",
# author_email = "steve.l.nyemba@vanderbilt.edu",
# license = "MIT",
# packages=['edi'],
# keywords=['healthcare', 'edi','x12','mongodb','couchdb','rabbitmq','file','read','write','s3'],
# install_requires = [
# 'data-transport@git+https://dev.the-phi.com/git/steve/data-transport.git',
# 'pymongo','numpy','cloudant','pika','boto','flask-session','smart_open'],
# url="https://hiplab.mc.vanderbilt.edu/tools",
# use_2to3=True,
# long_description=read('README.md'),
# convert_2to3_doctests=['README.md'],
# #use_2to3_fixers=['your.fixers'],
# use_2to3_exclude_fixers=['lib2to3.fixes.fix_import'],
# )