Skip to content

Commit bcf1436

Browse files
committed
Also log Python and NumPy (no just JPype) version.
This makes bug reporting clearer in the case where users paste the console output of the test suite, specifically the "discovery" part.
1 parent 39a1282 commit bcf1436

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

mph/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import jpype
1010
import jpype.imports # noqa: F401 (imported, but not used)
11+
1112
import os
1213
import faulthandler
1314
from pathlib import Path
@@ -182,7 +183,6 @@ def __init__(self,
182183
standalone = host and not port
183184

184185
# Start the Java virtual machine.
185-
log.debug(f'JPype version is {jpype.__version__}.')
186186
log.info('Starting Java virtual machine.')
187187
root = backend['root']
188188
args = [str(backend['jvm'])]

mph/discovery.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@
2424

2525
from __future__ import annotations
2626

27+
from numpy import __version__ as numpy_version
28+
from jpype import __version__ as jpype_version
29+
2730
import platform
2831
import subprocess
32+
import sys
2933
import re
3034
from pathlib import Path
3135
from functools import lru_cache
@@ -278,6 +282,11 @@ def find_backends() -> list[Backend]:
278282
# Detect platform architecture.
279283
arch = detect_architecture()
280284

285+
# Log relevant software versions for easier bug reporting.
286+
log.debug(f'Python version is "{sys.version}".')
287+
log.debug(f'NumPy version is {numpy_version}.')
288+
log.debug(f'JPype version is {jpype_version}.')
289+
281290
# Search system for Comsol executables.
282291
if system == 'Windows':
283292
executables = search_registry(arch)

mph/model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from numpy import array, ndarray
88
from numpy import integer
9+
910
from pathlib import Path
1011
from re import match
1112
from logging import getLogger

mph/node.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from jpype import JBoolean, JInt, JDouble, JString, JArray, JClass
66
from numpy import array, ndarray, integer
7+
78
from pathlib import Path
89
from re import split
910
from json import load as json_load

mph/session.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .config import option
88

99
import jpype
10+
1011
import atexit
1112
import sys
1213
import platform

0 commit comments

Comments
 (0)