Skip to content

Wrong __version__ in __init__.py #110

Description

@SkirOwen

Hi,

I've noticed the wrong version number set for __version__ in __init.py__.

One solution would be to use importlib.metadata.version('cmocean') to always the correct version number taken from the setup.py.

If that is something wanted, I am happy to do a PR for it :)

Activity

  1. kthyng commented on Jul 5, 2024

    @kthyng
    Contributor

    I'd appreciate your help on this, but what I would prefer is for the version to update itself. The reason the version on this is always messed is because I built this before I learned more about packaging myself and it is cobbled together from several people's work, and probably not consistent. But also because in my other packages I have github releases determine the version and it is passed on down from there. Every time I do a release here I have forgotten to update the file and then I have to release again after I update it and apparently I still did it wrong if you found an error!

  2. MatthewFlamm commented on Sep 11, 2024

    @MatthewFlamm
    Contributor

    I had these problems with my packages before when trying to manually update versioning. I switched to using setuptools-scm, and it makes things way easier in terms of maintenance. matplotlib itself is, in part, using this package. It is more complex there with meson-python in addition. See https://github.com/matplotlib/matplotlib/blob/029b026afe65da32f406af618dc3dd209f40120a/pyproject.toml#L93-L97

  3. QuLogic commented on Oct 8, 2024

    @QuLogic
    Member

    Probably would be fixed by #111, as it adds setuptools-scm.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions