Skip to content

Commit

Permalink
Merge pull request #333 from UXARRAY/aaronzedwick/version_method
Browse files Browse the repository at this point in the history
Implement Version Attribute
  • Loading branch information
philipc2 authored Jun 2, 2023
2 parents 8ca155d + 88e27d7 commit 168de63
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions uxarray/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
from .grid import *
from .helpers import *
# Sets the version of uxarray currently installed
# Attempt to import the needed modules
try:
from importlib.metadata import version as _version
except Exception:
from importlib_metadata import version as _version

try:
__version__ = _version("uxarray")
except Exception:
# Placeholder version incase an error occurs, such as the library isn't installed
__version__ = "999"

0 comments on commit 168de63

Please sign in to comment.