affinity_search/outputjson.py
def makejson():
	'''return dictionary of config options from makemodel'''
	opts = makemodel.getoptions()

	d=OrderedDict()
	for (name,vals) in sorted(opts.items()):
		paramsize=1
		if type(vals) == tuple:
			options=list(map(str,vals))
			paramtype="enum"
			data=OrderedDict([("name",name), ("type", paramtype), ("size", paramsize),("options",options)])
		elif isinstance(vals, makemodel.Range):
			parammin = vals.min
			parammax = vals.max
			paramtype="float"
			data=OrderedDict([("name",name), ("type", paramtype), ("min", parammin), ("max", parammax), ("size", paramsize)])
		else:
			print("Unknown type")
			sys.exit(-1)
		d[name]=data
	return d
return dictionary of config options from makemodel
return dictionary of config options from makemodel
return dictionary of config options from makemodel
def makejson():
	opts = makemodel.getoptions()
	d=OrderedDict()
	for (name,vals) in sorted(opts.items()):
		paramsize=1
		if type(vals) == tuple:
			options=list(map(str,vals))
			paramtype="enum"
			data=OrderedDict([("name",name), ("type", paramtype), ("size", paramsize),("options",options)])
		elif isinstance(vals, makemodel.Range):
			parammin = vals.min
			parammax = vals.max
			paramtype="float"
			data=OrderedDict([("name",name), ("type", paramtype), ("min", parammin), ("max", parammax), ("size", paramsize)])
		else:
			print("Unknown type")
			sys.exit(-1)
		d[name]=data
	return d
def makejson ( ) : opts = makemodel . getoptions ( ) d = OrderedDict ( ) for ( name , vals ) in sorted ( opts . items ( ) ) : paramsize = 1 if type ( vals ) == tuple : options = list ( map ( str , vals ) ) paramtype = "enum" data = OrderedDict ( [ ( "name" , name ) , ( "type" , paramtype ) , ( "size" , paramsize ) , ( "options" , options ) ] ) elif isinstance ( vals , makemodel . Range ) : parammin = vals . min parammax = vals . max paramtype = "float" data = OrderedDict ( [ ( "name" , name ) , ( "type" , paramtype ) , ( "min" , parammin ) , ( "max" , parammax ) , ( "size" , paramsize ) ] ) else : print ( "Unknown type" ) sys . exit ( - 1 ) d [ name ] = data return d
return dictionary of config options from makemodel
return dictionary of config options from makemodel
'''return dictionary of config options from makemodel'''