Skip to content

Commit

Permalink
Merge pull request #100 from ecmwf/fix/init-version-import
Browse files Browse the repository at this point in the history
Fix __version__ import
  • Loading branch information
HCookie authored Oct 25, 2024
2 parents 2bbcc3e + 92a8022 commit ded57a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Keep it human-readable, your future self will thank you!

- Remove upstream dependencies from downstream-ci workflow (temporary) (#83)
- ci: pin python versions to 3.9 ... 3.12 for checks (#93)
- Fix `__version__` import in init

## [0.5.7](https://github.com/ecmwf/anemoi-datasets/compare/0.5.6...0.5.7) - 2024-10-09

Expand Down
10 changes: 8 additions & 2 deletions src/anemoi/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.

from ._version import __version__
from .data import MissingDateError
from .data import add_dataset_path
from .data import add_named_dataset
from .data import list_dataset_names
from .data import open_dataset

try:
# NOTE: the `_version.py` file must not be present in the git repository
# as it is generated by setuptools at install time
from ._version import __version__ # type: ignore
except ImportError: # pragma: no cover
# Local copy or not installed with setuptools
__version__ = "999"

__all__ = [
"__version__",
"add_dataset_path",
"add_named_dataset",
"list_dataset_names",
Expand Down

0 comments on commit ded57a6

Please sign in to comment.