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

Use absolute import in tracking #1001

Closed
sahmed95 opened this Issue Mar 22, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@sahmed95
Contributor

sahmed95 commented Mar 22, 2016

Please refer to the original issue #969. Use absolute import in place of relative for all .py files inside /dipy. Take care not to change .pyx files

/dipy/dipy/tracking/gui_tools.py:
    5      from traitsui.api import Item, Group, View, ArrayEditor
    6  except ImportError:
    7:     from ..utils.optpkg import OptionalImportError
    8      raise OptionalImportError("You must have traits to use this module")
    9: from .interfaces import InputData
   10  
   11: from ..tracking.interfaces import InputData, ShmTrackingInterface
   12  
   13  I = InputData()

/dipy/dipy/tracking/interfaces.py:
   22      import traits.api as T
   23  except ImportError:
   24:     from ..utils.optpkg import OptionalImportError
   25      raise OptionalImportError("You must have traits to use this module")
   26  
   ..
   28  from nibabel.trackvis import write, empty_header
   29  
   30: from ..reconst.shm import (SlowAdcOpdfModel, MonoExpOpdfModel, QballOdfModel,
   31                            normalize_data, ClosestPeakSelector,
   32                            ResidualBootstrapWrapper, hat, lcr_matrix,
   33                            bootstrap_data_array, NND_ClosestPeakSelector)
   34: from ..reconst.interpolate import (TriLinearInterpolator,
   35                                    NearestNeighborInterpolator)
   36: from ..tracking.integration import (BoundryIntegrator, FixedStepIntegrator,
   37                                     generate_streamlines)
   38: from ..tracking.utils import (seeds_from_mask, target, merge_streamlines,
   39                               density_map)
   40: from ..io.bvectxt import (read_bvec_file, orientation_to_string,
   41                           reorient_vectors)
   42  

/dipy/dipy/tracking/local/__init__.py:
    1: from .localtracking import LocalTracking
    2: from .tissue_classifier import (ActTissueClassifier, BinaryTissueClassifier,
    3                                  ThresholdTissueClassifier, TissueClassifier)
    4: from .direction_getter import DirectionGetter
    5  from dipy.tracking import utils
    6  

/dipy/dipy/tracking/local/localtracking.py:
    1  import numpy as np
    2  
    3: from .localtrack import local_tracker
    4  from dipy.align import Bunch
    5  from dipy.tracking import utils

/dipy/dipy/tracking/markov.py:
   14  from __future__ import division, print_function, absolute_import
   15  
   16: from ..utils.six.moves import xrange
   17  
   18  import numpy as np
   19: from ..reconst.interpolate import OutsideImage, NearestNeighborInterpolator
   20  from dipy.direction.peaks import default_sphere, peak_directions
   21: from . import utils
   22  
   23  

/dipy/dipy/tracking/metrics.py:
    2  from __future__ import division, print_function, absolute_import
    3  
    4: from ..utils.six.moves import xrange
    5  
    6  import numpy as np

/dipy/dipy/tracking/tests/test_metrics.py:
    2  from __future__ import division, print_function, absolute_import
    3  
    4: from ...utils.six.moves import xrange
    5  
    6  import numpy as np

/dipy/dipy/tracking/tests/test_utils.py:
    1  from __future__ import division, print_function, absolute_import
    2  
    3: from ...utils.six.moves import xrange
    4  
    5  import numpy as np

/dipy/dipy/tracking/utils.py:
   58  
   59  from collections import defaultdict
   60: from ..utils.six.moves import xrange, map
   61  
   62  import numpy as np
   ..
   66  
   67  # Import helper functions shared with vox2track
   68: from ._utils import (_mapping_to_voxel, _to_voxel_coordinates)
   69  
   70  
@theaverageguy

This comment has been minimized.

Contributor

theaverageguy commented Mar 22, 2016

And this one.

theaverageguy added a commit to theaverageguy/dipy that referenced this issue Mar 22, 2016

theaverageguy added a commit to theaverageguy/dipy that referenced this issue Mar 22, 2016

theaverageguy added a commit to theaverageguy/dipy that referenced this issue Mar 22, 2016

theaverageguy added a commit to theaverageguy/dipy that referenced this issue Mar 23, 2016

theaverageguy added a commit to theaverageguy/dipy that referenced this issue Mar 23, 2016

theaverageguy added a commit to theaverageguy/dipy that referenced this issue Mar 23, 2016

theaverageguy added a commit to theaverageguy/dipy that referenced this issue Mar 23, 2016

theaverageguy added a commit to theaverageguy/dipy that referenced this issue Mar 23, 2016

@arokem arokem closed this in #1261 Jun 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment