Skip to content

Commit e2db192

Browse files
satraeffigies
authored andcommitted
enh: change variable name to be consistent
1 parent bb51c57 commit e2db192

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

nipype/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def check_latest_version(raise_exception=False):
124124
if config.getboolean("execution", "check_version"):
125125
import __main__
126126

127-
if not hasattr(__main__, "__file__") and "NO_NIPYPE_ET" not in os.environ:
127+
if not hasattr(__main__, "__file__") and "NIPYPE_NO_ET" not in os.environ:
128128
from .interfaces.base import BaseInterface
129129

130130
if BaseInterface._etelemetry_version_data is None:

nipype/interfaces/base/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def __init__(
170170
):
171171
if (
172172
config.getboolean("execution", "check_version")
173-
and "NO_NIPYPE_ET" not in os.environ
173+
and "NIPYPE_NO_ET" not in os.environ
174174
):
175175
from ... import check_latest_version
176176

nipype/pipeline/plugins/legacymultiproc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class NonDaemonPool(pool.Pool):
156156
def process_initializer(cwd):
157157
"""Initializes the environment of the child process"""
158158
os.chdir(cwd)
159-
os.environ["NO_NIPYPE_ET"] = "1"
159+
os.environ["NIPYPE_NO_ET"] = "1"
160160

161161

162162
class LegacyMultiProcPlugin(DistributedPluginBase):

nipype/pipeline/plugins/multiproc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def run_node(node, updatehash, taskid):
7676
def process_initializer(cwd):
7777
"""Initializes the environment of the child process"""
7878
os.chdir(cwd)
79-
os.environ["NO_NIPYPE_ET"] = "1"
79+
os.environ["NIPYPE_NO_ET"] = "1"
8080

8181

8282
class MultiProcPlugin(DistributedPluginBase):

nipype/pipeline/plugins/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ def create_pyscript(node, updatehash=False, store_exception=True):
126126
pass
127127
128128
import os
129-
value = os.environ.get('NO_NIPYPE_ET', None)
129+
value = os.environ.get('NIPYPE_NO_ET', None)
130130
if value is None:
131131
# disable ET for any submitted job
132-
os.environ['NO_NIPYPE_ET'] = "1"
132+
os.environ['NIPYPE_NO_ET'] = "1"
133133
from nipype import config, logging
134134
135135
from nipype.utils.filemanip import loadpkl, savepkl

nipype/tests/test_nipype.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ def _check_no_et():
2525
import os
2626
from unittest.mock import patch
2727

28-
et = os.getenv("NO_NIPYPE_ET") is None
28+
et = os.getenv("NIPYPE_NO_ET") is None
2929

30-
with patch.dict("os.environ", {"NO_NIPYPE_ET": "1"}):
30+
with patch.dict("os.environ", {"NIPYPE_NO_ET": "1"}):
3131
from nipype.interfaces.base import BaseInterface
3232

3333
ver_data = BaseInterface._etelemetry_version_data
@@ -67,13 +67,13 @@ def test_no_et(tmp_path):
6767
res = wf1.run()
6868
assert next(iter(res.nodes)).result.outputs.out is True
6969

70-
# MultiProc run - environment initialized with NO_NIPYPE_ET
70+
# MultiProc run - environment initialized with NIPYPE_NO_ET
7171
wf2 = pe.Workflow(name="wf2", base_dir=str(tmp_path))
7272
wf2.add_nodes([pe.Node(niu.Function(function=_check_no_et), name="n")])
7373
res = wf2.run(plugin="MultiProc", plugin_args={"n_procs": 1})
7474
assert next(iter(res.nodes)).result.outputs.out is False
7575

76-
# LegacyMultiProc run - environment initialized with NO_NIPYPE_ET
76+
# LegacyMultiProc run - environment initialized with NIPYPE_NO_ET
7777
wf3 = pe.Workflow(name="wf3", base_dir=str(tmp_path))
7878
wf3.add_nodes([pe.Node(niu.Function(function=_check_no_et), name="n")])
7979
res = wf3.run(plugin="LegacyMultiProc", plugin_args={"n_procs": 1})
@@ -93,7 +93,7 @@ def test_no_et(tmp_path):
9393
res = wf4.run(plugin="MultiProc", plugin_args={"n_procs": 1})
9494
assert next(iter(res.nodes)).result.outputs.out is True
9595

96-
# LegacyMultiProc run - environment initialized with NO_NIPYPE_ET
96+
# LegacyMultiProc run - environment initialized with NIPYPE_NO_ET
9797
wf5 = pe.Workflow(name="wf5", base_dir=str(tmp_path))
9898
wf5.add_nodes(
9999
[

0 commit comments

Comments
 (0)