Skip to content

Commit

Permalink
print the python version
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Oct 2, 2024
1 parent 6782473 commit b6d71fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Versioning currently follows `X.Y.Z` where
### Added

- Entities can be compared and sorted by ID now.
- Caching for list_not_existing_storage_directories.
- Show Python version in version info string.
- Caching for bfabric_list_not_existing_storage_directories.py.
- (experimental) add initial code for a resource based application dispatch
- (experimental) new app_runner cli that integrates all commands into a single interface

Expand Down
4 changes: 3 additions & 1 deletion src/bfabric/bfabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import base64
import importlib.metadata
import sys
from contextlib import AbstractContextManager
from contextlib import contextmanager
from datetime import datetime
Expand Down Expand Up @@ -257,8 +258,9 @@ def _get_version_message(self) -> tuple[str, str]:
engine_name = self._engine.__class__.__name__
base_url = self.config.base_url
user_name = f"U={self._auth.login if self._auth else None}"
python_version = f"PY={sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
return (
f"bfabricPy v{package_version} ({engine_name}, {base_url}, {user_name})",
f"bfabricPy v{package_version} ({engine_name}, {base_url}, {user_name}, {python_version})",
f"Copyright (C) 2014-{year} Functional Genomics Center Zurich",
)

Expand Down

0 comments on commit b6d71fe

Please sign in to comment.