CDCgov / cfa-config-generator

Apache License 2.0
0 stars 0 forks source link

CLI Setup for Modifying Tasks #20

Closed amondal2 closed 3 weeks ago

amondal2 commented 1 month ago

[This is downstream of #19 as I wanted @zsusswein to look at both before merging]

This PR implements logic to modify a given task. It recursively iterates through the keys in the task, prompting the user if they want to modify it, and updates the values accordingly. Also contains logic for list and nested dictionary keys. Also did some mild refactoring to move storage functions into utils/

This is the command I used for testing:

confmod modify-task -j Rt-estimation-bf57b6e297ad11efb20c00155d63cada-2024-10-31T17-29-56 -t bf57b6e297ad11efb20c00155d63cada_WY_Influenza_1730395796.json
amondal2 commented 3 weeks ago

@zsusswein nothing is being overwritten here (all updates push a new, timestamped task to storage), so mistakes could be "fixed" by just pushing a new task. we should probably implement some workflow to confirm/reject/edit changes before pushing, but that might take some time to figure out how to build correctly