NREL / ditto

DiTTo is a Distribution Transformation Tool that aims at providing an open source framework to convert various distribution systems modeling formats.
https://nrel.github.io/ditto/
BSD 3-Clause "New" or "Revised" License
68 stars 35 forks source link

Many tests call Store.set_names() which results in object-overwrite warnings #345

Open daniel-thom opened 4 years ago

daniel-thom commented 4 years ago

Many tests follow this pattern:

        m = Store()
        r = Reader(...)
        r.parse(m)
        m.set_names()

The OpenDSS reader calls set_names internally in the parse method. This causes a flood of Duplicate name <x> being set. Object overwritten warning messages.

@kdheepak @tarekelgindy Is there an expectation that the parse method either must or must not call set_names? If there is no such rule then what should be done here? Can the Reader class track whether set_names has been called and then skip redundant runs?