Get a list of staged (in-progress) imports.

        :return: :class:`imports.Import <imports.Import>` list
11517
def list(self):
        
        schema = ImportSchema()
        resp = self.service.list(self.base)
        return self.service.decode(schema, resp, many=True)
843000
def get_stages(self):
        '''
        
        '''
        sequence = self.get_sequence()
        stages = {}
        for seq in self._sequences:
            for e in seq:
                if e.src.get_name() not in stages:
                    stages[e.src.get_name()] = []
                if e.dst.get_name() not in stages[e.src.get_name()]:
                    stages[e.src.get_name()].append(e.dst.get_name())
        return {
            'current': [e.dst.get_name() for e in sequence],
            'stages': stages
        }
99460
def extract_imports(script):
    """"""
    if not os.path.isfile(script):
        raise ValueError('Not a file: %s' % script)
    parse_tree = parse_python(script)
    result = find_imports(parse_tree)
    result.path = script
    return result
878965
def get_all(self):
    
    return [{'label': x[0], 'timing': x[1], 'is_tool': x[0] in self._tool_labels}
            for x in sorted(self._timings_by_path.items(), key=lambda x: x[1], reverse=True)]
1209421
def celery_module_imports(sender, signal=None, **kwargs):
    """"""
    app = getattr(sender, 'flask_app', None)
    if app:
        app.extensions['invenio-celery'].load_entry_points()
648124
def get_raw_import_values(self):  # pragma: no cover, never used
        
        res = {}
        properties = list(self.__class__.properties.keys())
        # Register is not by default in the properties
        if 'register' not in properties:
            properties.append('register')

        for prop in properties:
            if hasattr(self, prop):
                val = getattr(self, prop)
                res[prop] = val
        return res
1201941
public List<String> getCurrentStages(Long processId, boolean reload) {
        if (reload) {
            reload(processId);
        }

        List<String> stages = currentStages.get(processId);
        if (stages == null) {
            stages = new ArrayList<String>();
        }
        return stages;
    }
12039
private static ImmutableList<ImportTree> getWildcardImports(List<? extends ImportTree> imports) {
    ImmutableList.Builder<ImportTree> result = ImmutableList.builder();
    for (ImportTree tree : imports) {
      // javac represents on-demand imports as a member select where the selected name is '*'.
      Tree ident = tree.getQualifiedIdentifier();
      if (!(ident instanceof MemberSelectTree)) {
        continue;
      }
      MemberSelectTree select = (MemberSelectTree) ident;
      if (select.getIdentifier().contentEquals("*")) {
        result.add(tree);
      }
    }
    return result.build();
  }
78223
def get_waiting_components(self):
        # type: () -> List[Tuple[str, str, Set[str]]]
        
        with self.__instances_lock:
            result = []
            for name, (context, _) in self.__waiting_handlers.items():
                # Compute missing handlers
                missing = set(context.factory_context.get_handlers_ids())
                missing.difference_update(self._handlers.keys())

                result.append((name, context.factory_context.name, missing))

            result.sort()
            return result
599748
def _get_controllers(self):
        
        controllers = dict()
        for pkg in pkg_resources.iter_entry_points(group=self.CONTROLLERS):
            LOGGER.debug('Loading %s controller', pkg.name)
            controllers[pkg.name] = importlib.import_module(pkg.module_name)
        return controllers
1184612
def getExportsList(self, enable=True):
        
        if enable:
            return [e for e in self._exports]
        else:
            return [e for e in self._exports_all]
774415
def all(self):
        
        class_list = list(self.get_class_list())
        if not class_list:
            self.cache = []
            return []

        if self.cache is not None:
            return self.cache

        results = []
        for cls_path in class_list:
            module_name, class_name = cls_path.rsplit('.', 1)
            try:
                module = __import__(module_name, {}, {}, class_name)
                cls = getattr(module, class_name)
                if self.instances:
                    results.append(cls())
                else:
                    results.append(cls)
            except Exception:
                logger.exception('Unable to import {cls}'.format(cls=cls_path))
                continue
        self.cache = results

        return results
415055
def get_roots(app=None):
    '''
    
    '''
    roots = set()
    plugins = app.config['PLUGINS'] if app else None
    for name in ENTRYPOINTS.keys():
        for ep in iter_all(name):
            if plugins is None or ep.name in plugins:
                roots.add(ep.module_name.split('.', 1)[0])
    return list(roots)
416616
def modules(self):
        

        if not self.get_objects_by_type('module'):
            self.inventory()
        return {int(c.index): c for c in self.get_objects_by_type('module')}
478199
def Godeps(self):
        
        dict = []
        for package in sorted(self._packages.keys()):
            dict.append({
                "ImportPath": str(package),
                "Rev": str(self._packages[package])
            })

        return dict
459647
def do_imports(self):
        
        self.do_import('worker_class', Worker)
        self.do_import('queue_model', self.options.worker_class.queue_model)
        self.do_import('error_model', self.options.worker_class.error_model)
        self.do_import('callback', self.options.worker_class.callback)
1227898
def exports(self):
        
        if self._exports is None:
            self._exports = ExportList(self)
        return self._exports