LLNL / ATS

ATS - Automated Testing System - is an open-source, Python-based tool for automating the running of tests of an application across a broad range of high performance computers.
BSD 3-Clause "New" or "Revised" License
7 stars 5 forks source link

remove attributedict, confusing and offers no benefit #74

Closed davidbloss closed 2 years ago

davidbloss commented 2 years ago

AttributeDict from ats/attributedict.py is a thin wrapper around a plain dictionary. The only "feature" it provides is allowing devs to update its contents like this: my_dict.new_thing = "fancy" in addition to the standard my_dict["new_thing"] = "fancy" approach that contains no surprises.

For this "extra" behavior we would want to use a @property within a class to facilitate some additional work. But given that no extra work is done when updating contents of an AttributeDict it seems more appropriate to simply call it what it is, a dictionary.

This also greatly improves readability and will allow for an easier update to ATS when integrating Flux into its core.