barronh / pseudonetcdf

PseudoNetCDF like NetCDF except for many scientific format backends
GNU Lesser General Public License v3.0
76 stars 35 forks source link

add __version__ to PseudoNETCDF #128

Closed mathause closed 1 year ago

mathause commented 2 years ago

PseudoNETCDF currently does not have the conventional PseudoNetCDF.__version__ string. Would nice if this was added. It currently needs to be imported as:

from PseudoNetCDF import version

version.version

In addition, when installing pseudonetcdf with conda the version is also reported wrong - it reports '3.1.0.dev0+Unknown' (I am not sure if that has to be fixed here or in conda-forge/pseudonetcdf-feedstock.

The background is that the new release breaks an xarray test. This should be easily fixable but only if we get the correct version number.

mathause commented 2 years ago

It's most likely possible to fix the xarray issue without the version number, see pydata/xarray#5875.

barronh commented 2 years ago

Great point. I realized that the version number was not correctly updated in the release. I'll add a version import of version.version and release v3.2.1. Will that solve the problem?

mathause commented 2 years ago

With pydata/xarray#5875 I could fix the issue without requiring the version number. But fixing this issue would nonetheless be appreciated!

You may want to do

import version.version as __version__

or

import version
__version__ = version.version
barronh commented 2 years ago

I have made the change, but am waiting for the release due to Travis-CI. If I can't get the build to launch quickly, I'll release after manually testing on another platform.