Skip to content

MAINT: fix interaction with external logging #2611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 2, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nipype/algorithms/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ..utils import NUMPY_MMAP
from ..utils.misc import normalize_mc_params

IFLOGGER = logging.getLogger('interface')
IFLOGGER = logging.getLogger('nipype.interface')


class ComputeDVARSInputSpec(BaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/algorithms/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
BaseInterfaceInputSpec)
from ..interfaces.vtkbase import tvtk
from ..interfaces import vtkbase as VTKInfo
IFLOGGER = logging.getLogger('interface')
IFLOGGER = logging.getLogger('nipype.interface')


class TVTKBaseInterface(BaseInterface):
Expand Down
2 changes: 1 addition & 1 deletion nipype/algorithms/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
isdefined)
from ..interfaces.nipy.base import NipyBaseInterface

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class DistanceInputSpec(BaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/algorithms/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

from . import confounds

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class PickAtlasInputSpec(BaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/algorithms/modelgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from ..utils.filemanip import ensure_list
from ..utils.misc import normalize_mc_params
from .. import config, logging
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


def gcd(a, b):
Expand Down
2 changes: 1 addition & 1 deletion nipype/algorithms/rapidart.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from ..utils.filemanip import ensure_list, save_json, split_filename
from ..utils.misc import find_indices, normalize_mc_params
from .. import logging, config
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


def _get_affine_matrix(params, source):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/afni/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ...external.due import BibTeX

# Use nipype's logging system
IFLOGGER = logging.getLogger('interface')
IFLOGGER = logging.getLogger('nipype.interface')


class Info(PackageInfo):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/ants/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ... import logging, LooseVersion
from ..base import (CommandLine, CommandLineInputSpec, traits, isdefined,
PackageInfo)
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')

# -Using -1 gives primary responsibilty to ITKv4 to do the correct
# thread limitings.
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/base/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from future import standard_library
standard_library.install_aliases()

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')

PY35 = sys.version_info >= (3, 5)
PY3 = sys.version_info[0] > 2
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/base/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from ... import logging
from ...utils.misc import is_container
from ...utils.filemanip import md5, to_str, hash_infile
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class NipypeInterfaceError(Exception):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/cmtk/cmtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from ..base import (BaseInterface, BaseInterfaceInputSpec, traits, File,
TraitedSpec, Directory, OutputMultiPath, isdefined)
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


def length(xyz, along=False):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/cmtk/nbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ..base import (LibraryBaseInterface, BaseInterfaceInputSpec, traits, File,
TraitedSpec, InputMultiPath, OutputMultiPath, isdefined)
from .base import have_cv
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


def ntwks_to_matrices(in_files, edge_key):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/cmtk/nx.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
TraitedSpec, InputMultiPath, OutputMultiPath, isdefined)
from .base import have_cmp

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


def read_unknown_ntwk(ntwk):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/cmtk/parcellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
BaseInterfaceInputSpec, traits, File,
TraitedSpec, Directory, isdefined)
from .base import have_cmp
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


def create_annot_label(subject_id, subjects_dir, fs_dir, parcellation_name):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/dipy/anisotropic_power.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..base import TraitedSpec, File, isdefined
from .base import DipyDiffusionInterface, DipyBaseInterfaceInputSpec

IFLOGGER = logging.getLogger('interface')
IFLOGGER = logging.getLogger('nipype.interface')


class APMQballInputSpec(DipyBaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/dipy/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ..base import (traits, TraitedSpec, File, isdefined)
from .base import DipyBaseInterface

IFLOGGER = logging.getLogger('interface')
IFLOGGER = logging.getLogger('nipype.interface')


class ResampleInputSpec(TraitedSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/dipy/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from ..base import TraitedSpec, File, traits, isdefined
from .base import DipyDiffusionInterface, DipyBaseInterfaceInputSpec

IFLOGGER = logging.getLogger('interface')
IFLOGGER = logging.getLogger('nipype.interface')


class RESTOREInputSpec(DipyBaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/dipy/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ..base import (traits, TraitedSpec, BaseInterfaceInputSpec, File,
InputMultiPath, isdefined)
from .base import DipyBaseInterface
IFLOGGER = logging.getLogger('interface')
IFLOGGER = logging.getLogger('nipype.interface')


class SimulateMultiTensorInputSpec(BaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/dipy/tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..base import TraitedSpec, File, isdefined
from .base import DipyDiffusionInterface, DipyBaseInterfaceInputSpec

IFLOGGER = logging.getLogger('interface')
IFLOGGER = logging.getLogger('nipype.interface')


class DTIInputSpec(DipyBaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/dipy/tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ..base import (TraitedSpec, BaseInterfaceInputSpec, File, isdefined,
traits)
from .base import DipyBaseInterface
IFLOGGER = logging.getLogger('interface')
IFLOGGER = logging.getLogger('nipype.interface')


class TrackDensityMapInputSpec(BaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/dtitk/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from nipype.interfaces.fsl.base import Info
import warnings

LOGGER = logging.getLogger('interface')
LOGGER = logging.getLogger('nipype.interface')


class DTITKRenameMixin(object):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/elastix/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from ... import logging
from ..base import CommandLineInputSpec, Directory, traits
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class ElastixBaseInputSpec(CommandLineInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/elastix/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from .base import ElastixBaseInputSpec
from ..base import CommandLine, TraitedSpec, File, traits, InputMultiPath

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class RegistrationInputSpec(ElastixBaseInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/elastix/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from ... import logging
from ..base import (BaseInterface, BaseInterfaceInputSpec, isdefined,
TraitedSpec, File, traits)
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class EditTransformInputSpec(BaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/freesurfer/longitudinal.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
FSTraitedSpecOpenMP)

__docformat__ = 'restructuredtext'
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class RobustTemplateInputSpec(FSTraitedSpecOpenMP):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/freesurfer/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from .utils import copy2subjdir

__docformat__ = 'restructuredtext'
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')

# Keeping this to avoid breaking external programs that depend on it, but
# this should not be used internally
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/freesurfer/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from ..base import (isdefined, TraitedSpec, File, traits, Directory)

__docformat__ = 'restructuredtext'
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class MPRtoMNI305InputSpec(FSTraitedSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/freesurfer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
]
implicit_filetypes = ['gii']

logger = logging.getLogger('interface')
logger = logging.getLogger('nipype.interface')


def copy2subjdir(cls, in_file, folder=None, basename=None, subject_id=None):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/fsl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
PackageInfo)
from ...external.due import BibTeX

IFLOGGER = logging.getLogger('interface')
IFLOGGER = logging.getLogger('nipype.interface')


class Info(PackageInfo):
Expand Down
8 changes: 4 additions & 4 deletions nipype/interfaces/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
except:
pass

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


def copytree(src, dst, use_hardlink=False):
Expand Down Expand Up @@ -513,7 +513,7 @@ def _fetch_bucket(self, bucket_name):

# Init variables
creds_path = self.inputs.creds_path
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would actually remove this line, as well as the others (L590, L658), as they're overriding a file-level variable, but not changing it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, fixed.


# Get AWS credentials
try:
Expand Down Expand Up @@ -587,7 +587,7 @@ def _upload_to_s3(self, bucket, src, dst):
from botocore.exceptions import ClientError

# Init variables
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')
s3_str = 's3://'
s3_prefix = s3_str + bucket.name

Expand Down Expand Up @@ -655,7 +655,7 @@ def _list_outputs(self):
"""

# Init variables
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')
outputs = self.output_spec().get()
out_files = []
# Use hardlink
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/mixins/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ..base import (
File, BaseInterface, BaseInterfaceInputSpec, TraitedSpec)

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class ReportCapableInputSpec(BaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/mne/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ..base import (traits, File, Directory, TraitedSpec, OutputMultiPath)
from ..freesurfer.base import FSCommand, FSTraitedSpec

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class WatershedBEMInputSpec(FSTraitedSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/mrtrix/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ..base import TraitedSpec, File, isdefined
from ..dipy.base import DipyBaseInterface, HAVE_DIPY as have_dipy

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


def transform_to_affine(streams, header, affine):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/mrtrix/tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ...utils.filemanip import split_filename
from ..base import (CommandLineInputSpec, CommandLine, BaseInterface, traits,
File, TraitedSpec, isdefined)
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class DWI2SphericalHarmonicsImageInputSpec(CommandLineInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/mrtrix3/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from ... import logging
from ..base import (CommandLineInputSpec, CommandLine, traits, File, isdefined)
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class MRTrix3BaseInputSpec(CommandLineInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/niftyreg/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from ..base import CommandLine, CommandLineInputSpec, traits, Undefined
from ...utils.filemanip import split_filename

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


def get_custom_path(command, env_dir='NIFTYREGDIR'):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/spm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from ...external.due import due, Doi, BibTeX

__docformat__ = 'restructuredtext'
logger = logging.getLogger('interface')
logger = logging.getLogger('nipype.interface')


def func_is_3d(in_file):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/spm/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
ImageFileSPM)

__docformat__ = 'restructuredtext'
iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class Level1DesignInputSpec(SPMCommandInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/utility/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from ...utils.filemanip import ensure_list
from ...utils.functions import getsource, create_function_from_source

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class FunctionInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/vtkbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import os
from .. import logging

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')

# Check that VTK can be imported and get version
_vtk_version = None
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/workbench/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ...utils.filemanip import split_filename
from ..base import CommandLine, PackageInfo

iflogger = logging.getLogger('interface')
iflogger = logging.getLogger('nipype.interface')


class Info(PackageInfo):
Expand Down
Loading