diff --git a/finalize.py b/finalize.py index a375b37..fd50d1d 100644 --- a/finalize.py +++ b/finalize.py @@ -139,7 +139,8 @@ import json # path = '../curation-prod.json' # credentials = service_account.Credentials.from_service_account_file(path) # df = pd.read_gbq("SELECT * FROM io.icd10_partial_io",credentials=credentials,dialect='standard') -f = open('config.json') +filename = 'config.json' if 'config' not in SYS_ARGS else SYS_ARGS['config'] +f = open(filename) config = json.loads(f.read()) args = config['pipeline'] f.close() @@ -152,8 +153,10 @@ if __name__ == '__main__' : """ if 'move' in SYS_ARGS : table = SYS_ARGS['from'] - contexts = [item['context'] for item in config['pipeline'] if item['from'] == args['from']] + contexts = [item['context'] for item in config['pipeline'] if item['from'] == SYS_ARGS['from']] args = dict(config,**{"private_key":"../curation-prod.json"}) args = dict(args,**SYS_ARGS) args['contexts'] = contexts - move(**args) \ No newline at end of file + move(**args) + else: + print ("NOT YET READY !") \ No newline at end of file