Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Change method of reporting target data #4593
In a previous version we were reporting target information by providing a string that is a key and a value which was a dict containing a lot of information. We want to be able to provide a list of keys that will recursively find the right place in a nested dict to store a primitive value (rather than a dictionary) to the reporting method.
I created to helper methods to do this work. One recursively nests they keys with the value, and another does the work of finding the correctly place in an existing dictionary to update with the new nested dict.
These changes will affect how developers call the report_target_info API. As far as I know, no one is using it yet, so we don't need to make any changes to the dev documentation (apart from the method docs itself).
Thanks Dorothy... the tests look thorough. It looks like it might be possible to simplify the logic a bit... it's not clear why slicing is necessary.
Thanks Dorothy. Aside from adding an Exception for trying to overwrite an existing dict with a primitive, this looks good.
Benjy is back tomorrow, so let's wait for his go before merging.
Overall looks good - see comments inline.
Thanks for breaking this up into two changes. Makes it easier to review.
Very close now. Just a handful of remaining comments.