calliope-project / calliope

A multi-scale energy systems modelling framework

Home Page:https://www.callio.pe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace AttrDict with a functionally equivalent dependency

brynpickering opened this issue · comments

Problem description

AttrDict is a internal Calliope Class that has worked well for many years. However, it's possibly volatile and requires us to maintain it alongside core Calliope functionality. In fact, we've been forcing pytest to a very old version for the past years due to AttrDict not having a __name__ attribute (since all attributes of AttrDict are also dictionary keys); this led to one failed fix (762c322) followed by another successful fix (b8f57d8) that may or may not be stable in the long run.

For v0.7.0 we would be better off depending on a maintained package that does this for us.

One example is Box. I'm sure there are many others out there which we could choose from.

Calliope version

0.6.7-dev

The obvious choice, attrdict, does not seem to be maintained any longer: https://github.com/bcj/AttrDict. Box looks good.

Waiting to see which one of Box or benedict resolves first.