rosemariafontana commited on
Commit
e603db5
·
verified ·
1 Parent(s): 6e8b5f5

Update script_for_automation.py

Browse files
Files changed (1) hide show
  1. script_for_automation.py +7 -3
script_for_automation.py CHANGED
@@ -469,6 +469,9 @@ def drive_process():
469
  print("PROCESSING SPECIFICATIONS!!!!!!!!!!!!!!!")
470
  processed_farm_activity_json, processed_interactions_json, processed_trials_json = process_specifications(proc_spec)
471
 
 
 
 
472
 
473
  print("Gold Standard diff and stuff")
474
  # Get the gold standard for this input_chunk (key = liz_carrot, ben_soybean, wally_squash)
@@ -480,10 +483,11 @@ def drive_process():
480
  # "trials": liz_carrot_trials_gold_standard,
481
  # },
482
 
483
- gold_standard_planting_json = gold_standard_json["planting"]
484
- gold_standard_interactions_json = gold_standard_json["interactions"]
485
- gold_standard_trials_json = gold_standard_json["trials"]
486
 
 
487
  # Compare the generated JSON to the gold standard
488
  differences_planting = list(diff(gold_standard_planting_json, processed_farm_activity_json))
489
  differences_interactions = list(diff(gold_standard_interactions_json, processed_interactions_json))
 
469
  print("PROCESSING SPECIFICATIONS!!!!!!!!!!!!!!!")
470
  processed_farm_activity_json, processed_interactions_json, processed_trials_json = process_specifications(proc_spec)
471
 
472
+ processed_farm_activity_json = json.loads(processed_farm_activity_json)
473
+ processed_interactions_json = json.loads(processed_interactions_json)
474
+ processed_trials_json = json.loads(processed_trials_json)
475
 
476
  print("Gold Standard diff and stuff")
477
  # Get the gold standard for this input_chunk (key = liz_carrot, ben_soybean, wally_squash)
 
483
  # "trials": liz_carrot_trials_gold_standard,
484
  # },
485
 
486
+ gold_standard_planting_json = json.loads(gold_standard_json["planting"])
487
+ gold_standard_interactions_json = json.loads(gold_standard_json["interactions"])
488
+ gold_standard_trials_json = json.loads(gold_standard_json["trials"])
489
 
490
+
491
  # Compare the generated JSON to the gold standard
492
  differences_planting = list(diff(gold_standard_planting_json, processed_farm_activity_json))
493
  differences_interactions = list(diff(gold_standard_interactions_json, processed_interactions_json))