Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure versions are logged to file #49

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions src/somd2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,3 @@
# Store the sire version.
from sire import __version__ as _sire_version
from sire import __revisionid__ as _sire_revisionid

# Determine whether we're being run interactively.
try:
_shell = get_ipython().__class__.__name__
if _shell == "ZMQInteractiveShell":
_is_interactive = True # Jupyter notebook or qtconsole
elif _shell == "TerminalInteractiveShell":
_is_interactive = True # Terminal running IPython
else:
_is_interactive = False # Other type (?)
del _shell
except NameError:
_is_interactive = False # Probably standard Python interpreter

if not _is_interactive:
# Log the versions of somd2 and sire.
_logger.info(f"somd2 version: {__version__}")
_logger.info(f"sire version: {_sire_version}+{_sire_revisionid}")

del _is_interactive
6 changes: 6 additions & 0 deletions src/somd2/runner/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ def __init__(self, system, config):
self._config = config
self._config._extra_args = {}

# Log the versions of somd2 and sire.
from somd2 import __version__, _sire_version, _sire_revisionid

_logger.info(f"somd2 version: {__version__}")
_logger.info(f"sire version: {_sire_version}+{_sire_revisionid}")

# Check whether we need to apply a perturbation to the reference system.
if self._config.pert_file is not None:
_logger.info(
Expand Down
Loading