aws-samples / amazon-omics-tutorials

Apache License 2.0
56 stars 23 forks source link

Allow run name to be none when computing cost of a run #46

Closed smlchen closed 6 months ago

smlchen commented 6 months ago

compute_pricing.py fails with the following error if run name is empty.

python compute_pricing.py 9427547
Traceback (most recent call last):
  File "/Users/sachen/Desktop/amazon-omics-tutorials/utils/scripts/compute_pricing.py", line 147, in <module>
    cost = get_run_cost(args.run_id, client=session.client('omics'), offering=args.offering)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sachen/Desktop/amazon-omics-tutorials/utils/scripts/compute_pricing.py", line 126, in get_run_cost
    "name": run['name'],
            ~~~^^^^^^^^
KeyError: 'name'
wleepang commented 6 months ago

Resolved in #47