sidewall
sidewall copied to clipboard
Move parsing of id to core.py
Currently, all the subclasses of DimensionsCore handle pulling out the Dimensions id themselves. I did it this way because in the beginning, I wasn't sure if the identifier of every Dimensions object was in an attribute named id
or whether it was sometimes named id
and sometimes something else (like the case for orcid
and orcid_id
). It now looks like everything really does have an id
, so the best thing to do now would be to pull out id
from the list of _new_attributes
on the subclasses and put it in _attributes
on DimensionCore
, then add the necessary code to parse it in _set_attributes()
on DimensionCore
, and finally remove it from the places where it appears in the subclasses' _set_attributes()
.