Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit 72c30c3

Browse files
committed
Add _version module
1 parent 0250ed1 commit 72c30c3

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/ussa1976/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""USSA1976."""
2-
__version__ = "0.1.0"
3-
2+
from ._version import _version as __version__
43
from .core import compute
54

65
__all__ = ["compute", "__version__"]

src/ussa1976/_version.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from importlib import metadata
2+
3+
_version = metadata.version("ussa1976")

src/ussa1976/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from scipy.integrate import cumulative_trapezoid
2525
from scipy.interpolate import interp1d
2626

27-
from . import __version__
27+
from ._version import _version
2828
from .constants import A
2929
from .constants import ALPHA
3030
from .constants import AR_7
@@ -444,9 +444,9 @@ def init_data_set(z: npt.NDArray[np.float64]) -> xr.Dataset: # type: ignore
444444
"title": "U.S. Standard Atmosphere 1976",
445445
"history": (
446446
f"{datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')}"
447-
f" - data set creation - ussa1976, version {__version__}"
447+
f" - data set creation - ussa1976, version {_version}"
448448
),
449-
"source": f"ussa1976, version {__version__}",
449+
"source": f"ussa1976, version {_version}",
450450
"references": (
451451
"U.S. Standard Atmosphere, 1976, NASA-TM-X-74335" "NOAA-S/T-76-1562"
452452
),

0 commit comments

Comments
 (0)