Skip to content

Commit

Permalink
Fix __version__ import (#3)
Browse files Browse the repository at this point in the history
-  Use standard try-except

Co-authored-by: b8raoult <[email protected]>
  • Loading branch information
HCookie and b8raoult authored Oct 26, 2024
1 parent f247c60 commit 0e5a304
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ Keep it human-readable, your future self will thank you!
### Changed

- Add more attributes to typed variables
- Fix `__version__` import in init
- Update copyright notice
8 changes: 8 additions & 0 deletions src/anemoi/transform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.

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"

0 comments on commit 0e5a304

Please sign in to comment.