Skip to content

get_series and get_dataset from melodi override metadata functions #313

Open

Description

@tfardet

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?

Activity

  1. added
    bug
    on Oct 22, 2026
  2. tgrandje commented on Oct 26, 2026

    @tgrandje
    Collaborator

    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_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?

  3. hadrilec commented on Oct 26, 2026

    @hadrilec
    Contributor

    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_...

  4. tfardet commented on Oct 28, 2026

    @tfardet
    CollaboratorAuthor

    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?

  5. tgrandje commented on Oct 30, 2026

    @tgrandje
    Collaborator

    Ok, I'm on it. Two options:

    • 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions