Skip to content

Commit 66a82c1

Browse files
committed
ENH: Ensure nipype telemetry is just pinged once
1 parent c772d64 commit 66a82c1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

fmriprep/config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ class nipype(_Config):
244244

245245
crashfile_format = 'txt'
246246
"""The file format for crashfiles, either text or pickle."""
247+
disable_telemetry = bool(os.getenv("NIPYPE_NO_ET") is None)
248+
"""Disable interface telemetry"""
247249
get_linked_libs = False
248250
"""Run NiPype's tool to enlist linked libraries for every interface."""
249251
memory_gb = None
@@ -293,13 +295,20 @@ def init(cls):
293295
})
294296
ncfg.enable_resource_monitor()
295297

298+
if not cls.disable_telemetry:
299+
# check for latest version
300+
from nipype import check_latest_version
301+
check_latest_version()
302+
os.environ["NIPYPE_NO_ET"] = "1"
303+
296304
# Nipype config (logs and execution)
297305
ncfg.update_config({
298306
'execution': {
299307
'crashdump_dir': str(execution.log_dir),
300308
'crashfile_format': cls.crashfile_format,
301309
'get_linked_libs': cls.get_linked_libs,
302310
'stop_on_first_crash': cls.stop_on_first_crash,
311+
'check_version': False, # disable future telemetry
303312
}
304313
})
305314

0 commit comments

Comments
 (0)