Skip to content

Commit

Permalink
Merge pull request #1327 from knutfrode/dev
Browse files Browse the repository at this point in the history
versions() also prints versions of adios_db and copernicusmarine
  • Loading branch information
knutfrode authored Jun 24, 2024
2 parents 22b3867 + 1699490 commit 78548f3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions opendrift/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ def versions():
import matplotlib
import netCDF4
import xarray
try:
import adios_db
adios_version = adios_db.__version__
except:
adios_version = ': Not installed'
try:
import copernicusmarine
copernicus_version = copernicusmarine.__version__
except:
copernicus_version = ': Not installed'
import sys
s = '\n------------------------------------------------------\n'
s += 'Software and hardware:\n'
Expand All @@ -143,6 +153,8 @@ def versions():
s += ' Matplotlib version %s\n' % matplotlib.__version__
s += ' NetCDF4 version %s\n' % netCDF4.__version__
s += ' Xarray version %s\n' % xarray.__version__
s += ' ADIOS (adios_db) version %s\n' % adios_version
s += ' Copernicusmarine version %s\n' % copernicus_version
s += ' Python version %s\n' % sys.version.replace('\n', '')
s += '------------------------------------------------------\n'
return s
Expand Down

0 comments on commit 78548f3

Please sign in to comment.