Skip to content

Commit 62c3101

Browse files
module check now returns true or false
1 parent 07e87d3 commit 62c3101

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

smodels/base/runtime.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,19 @@
2121

2222
_deltas_rel_default = .2 ## the default relative error on the signal strength
2323

24-
def checkForIncompatibleModuleVersions():
24+
def checkForIncompatibleModuleVersions() -> bool:
2525
""" for 3.1.0, at release time, we have the problem that scipy 1.16
2626
does not work with pyhf 0.7.6. we warn about such situations.
27+
28+
:returns: false if incompatible version found, else true
2729
"""
2830
from importlib.metadata import version
2931
if version("scipy")[:4] in [ "1.16", "1.17" ]:
3032
print ( f"SModelS warning: scipy v{version('scipy')} is installed, but it seems " \
3133
"this version does not work with pyhf 0.7.6. We recommend scipy 1.15.x " \
3234
"and pyhf 0.7.6. You have been warned." )
35+
return False
36+
return True
3337

3438
checkForIncompatibleModuleVersions()
3539

0 commit comments

Comments
 (0)