Skip to content

Commit

Permalink
add show_versions function
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrakenhoff committed Dec 18, 2024
1 parent d3441d5 commit 328bb23
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion timml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from timml.stripareasink import XsectionAreaSink
from timml.trace import timtraceline, timtracelines
from timml.uflow import Uflow
from timml.version import __version__
from timml.version import __version__, show_versions
from timml.well import HeadWell, LargeDiameterWell, Well, WellBase

# default bessel module is numba
Expand Down
17 changes: 17 additions & 0 deletions timml/version.py
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
from importlib import metadata
from platform import python_version

__version__ = "6.6.0.dev0"


def show_versions() -> None:
"""Print the version of dependencies."""
msg = (
f"TimML version : {__version__}\n\n"
f"Python version : {python_version()}\n"
f"Numpy version : {metadata.version('numpy')}\n"
f"Numba version : {metadata.version('numba')}\n"
f"Scipy version : {metadata.version('scipy')}\n"
f"Pandas version : {metadata.version('pandas')}\n"
f"Matplotlib version : {metadata.version('matplotlib')}"
)
print(msg)

0 comments on commit 328bb23

Please sign in to comment.