You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
get_series and get_dataset from melodi override metadata functions #313
Due to the import * in pynsee main __init__.py, the new MELODI functions are shadowing the Macrodata functions so anyone doing a from pynsee import get_series will get the new melodi function instead in 0.3.0.
I'm a bit unsure what's the best way to handle this, apart from the fact that we should try not to break previous scripts.
I'm unsure how badly get_series will break stuff, but get_dataset definitely will.
Should we also rename get_series or do we want to push melodi?
And what should we rename them to.
@tgrandje should we still set an alias so you can do from pynsee.melodi import get_dataset?
For melodi, I think the best would be to rename upperlevel functions to get_melodi_....
We could also rename all functions in historic submodules (like get_macrodata_series or something like that). That's not going to work for things like search_macrodata in macrodata but that one is straightforward so I don't expect any misunderstandings.
What do you think of keeping an alias (linked to old functions) with a warning hinting to use the new function names?
thanks for spotting this bug!
In order to minimize disruption on existing code, I would prefer that old functions stay as-is, and that new functions from the melodi module are renamed eg get_melodi_...
considering that 0.3.0 is very recent, we yank the 0.3.0 and rename functions (also slightly impacting the users which have already used melodi)
or we alter the pynsee.init and pynsee.melodi.init files in order to (still) allow from pynsee.melodi import get_series, along with a warning stating it is being renamed.
I'm in favour of the first option (second one is impracticle I think)
Activity
tgrandje commentedon Oct 26, 2026
Mmh, good catch...
For melodi, I think the best would be to rename upperlevel functions to
get_melodi_....We could also rename all functions in historic submodules (like
get_macrodata_seriesor something like that). That's not going to work for things likesearch_macrodatain macrodata but that one is straightforward so I don't expect any misunderstandings.What do you think of keeping an alias (linked to old functions) with a warning hinting to use the new function names?
hadrilec commentedon Oct 26, 2026
thanks for spotting this bug!
In order to minimize disruption on existing code, I would prefer that old functions stay as-is, and that new functions from the
melodimodule are renamed egget_melodi_...tfardet commentedon Oct 28, 2026
OK, let's rename the melodi functions, then!
@tgrandje sorry to dump that on you but would you, by any chance, have time to do it?
tgrandje commentedon Oct 30, 2026
Ok, I'm on it. Two options:
from pynsee.melodi import get_series, along with a warning stating it is being renamed.I'm in favour of the first option (second one is impracticle I think)