Skip to content

Commit

Permalink
Merge pull request #255 from bedapub/252-add-matplotlib-version-to-bc…
Browse files Browse the repository at this point in the history
…print_software_versions

#252 added matplotlib version to print_software_versions
  • Loading branch information
kohleman authored Sep 16, 2022
2 parents 176447d + a5cd5e2 commit 26b1037
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions besca/_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from collections import namedtuple
import re
from besca._version import get_versions
import matplotlib


def subset_adata(adata, filter_criteria, raw=True, axis=0):
"""Subset AnnData object into new object
Expand Down Expand Up @@ -484,7 +486,7 @@ def concate_adata(adata1, adata2):
return adata_combined


def print_software_versions():
def print_software_versions() -> namedtuple:
"""Print scanpy and besca software versions
The function prints scanpy and besca software versions and return them
Expand All @@ -499,14 +501,12 @@ def print_software_versions():
"""

scv = sc.__version__
if(StrictVersion(scv) >= "1.6"):
if StrictVersion(scv) >= "1.6":
sc.logging.print_header()
else:
sc.logging.print_versions()
bcver = get_versions()["version"]
bcstr = StrictVersion(re.sub("\\+.*$", "", bcver))
print("besca=={}".format(bcstr))
Versions = namedtuple('Versions', ['scanpy', 'besca'])
res = Versions(scanpy=scv, besca=bcver)
return res

print(f"besca=={bcstr}\nmatplotlib=={matplotlib.__version__}")
Versions = namedtuple("Versions", ["scanpy", "besca"])
return Versions(scanpy=scv, besca=bcver)

0 comments on commit 26b1037

Please sign in to comment.