This error wasn't do what it was supposed to do, since it never checked if date_part was passed. I don't think this ever got triggered because MFS was parsing the grain from the name param and passing it via the grain param instead.
I ran into this error in the process of trying to create consistency in the behavior of our Jinja params. Since most interfaces allow passing grain via dundered syntax, this interface is inconsistent. If we eventually want to retire the dunder syntax, we should deprecate it everywhere at once to avoid creating confusion for our users in the meantime.
Two things:
date_part
was passed. I don't think this ever got triggered because MFS was parsing the grain from thename
param and passing it via thegrain
param instead.