Fetches the file paths to the features files and labels files
        corresponding to the provided list of features
358148
def prefixes_to_fns(self, prefixes: List[str]) -> Tuple[List[str], List[str]]:
        
        # TODO Return pathlib.Paths
        feat_fns = [str(self.feat_dir / ("%s.%s.npy" % (prefix, self.feat_type)))
                    for prefix in prefixes]
        label_fns = [str(self.label_dir / ("%s.%s" % (prefix, self.label_type)))
                      for prefix in prefixes]
        return feat_fns, label_fns
929131
def _items_to_rela_paths(self, items):
        """"""
        paths = []
        for item in items:
            if isinstance(item, (BaseIndexEntry, (Blob, Submodule))):
                paths.append(self._to_relative_path(item.path))
            elif isinstance(item, string_types):
                paths.append(self._to_relative_path(item))
            else:
                raise TypeError("Invalid item type: %r" % item)
        # END for each item
        return paths
1203916
def _get_result_paths(self, data):
        
        result = {}

        # Always output:
        result['UnassembledReads1'] = ResultPath(Path=
                                                 self._unassembled_reads1_out_file_name(
                                                 ),
                                                 IsWritten=True)
        result['UnassembledReads2'] = ResultPath(Path=
                                                 self._unassembled_reads2_out_file_name(
                                                 ),
                                                 IsWritten=True)

        # optional output, so we check for each
        # check for assembled reads file
        if self.Parameters['-s'].isOn():
            result['Assembled'] = ResultPath(Path=
                                             self._assembled_out_file_name(),
                                             IsWritten=True)

        # check for discarded (unassembled) reads1 file
        if self.Parameters['-3'].isOn():
            result['Reads1Discarded'] = ResultPath(Path=
                                                   self._discarded_reads1_out_file_name(
                                                   ),
                                                   IsWritten=True)

        # check for discarded (unassembled) reads2 file
        if self.Parameters['-4'].isOn():
            result['Reads2Discarded'] = ResultPath(Path=
                                                   self._discarded_reads2_out_file_name(
                                                   ),
                                                   IsWritten=True)

        # check for pretty-alignment file
        if self.Parameters['-E'].isOn():
            result['PrettyAlignments'] = ResultPath(Path=
                                                    self._pretty_alignment_out_file_name(
                                                    ),
                                                    IsWritten=True)

        return result
316736
def loadFeatures(self, path_to_fc):
        
        from ..common.spatial import featureclass_to_json
        v = json.loads(featureclass_to_json(path_to_fc))
        self.value = v
755330
def get_paths(patterns, start_dirs=None, max_depth=1):
    """"""
    # Shortcut: if there is only one pattern, make sure we process just that.
    if len(patterns) == 1 and not start_dirs:
        pattern = patterns[0]
        directory = os.path.dirname(pattern)
        if directory:
            patterns = [os.path.basename(pattern)]
            start_dirs = directory
            max_depth = 1

    if not start_dirs or start_dirs == '.':
        start_dirs = os.getcwd()
    for start_dir in start_dirs.split(','):
        for root, dirs, files in os.walk(start_dir):  # pylint: disable=W0612
            if max_depth is not None:
                relpath = os.path.relpath(root, start=start_dir)
                depth = len(relpath.split(os.sep))
                if depth > max_depth:
                    continue
            names = []
            for pattern in patterns:
                names += fnmatch.filter(files, pattern)
            for name in names:
                path = os.path.join(root, name)
                yield path
1132383
def _get_result_paths(self, data):
        

        result = {}

        result['Output'] = ResultPath(
            Path=self.Parameters['--output'].Value,
            IsWritten=self.Parameters['--output'].isOn())

        result['ClusterFile'] = ResultPath(
            Path=self.Parameters['--uc'].Value,
            IsWritten=self.Parameters['--uc'].isOn())

        result['PairwiseAlignments'] = ResultPath(
            Path=self.Parameters['--fastapairs'].Value,
            IsWritten=self.Parameters['--fastapairs'].isOn())

        return result
561229
def list_files(self, node=None):
        

        return [file_node.path for file_node in self.list_file_nodes(node) if file_node.path]
57447
def get_file_path(self, path):
        
        feature_filename = self._get_filename_path(path)

        feature_filename += self.file_format.extension()
        if self.compress_level:
            feature_filename += FileFormat.GZIP.extension()

        return feature_filename
474166
def pathNames(self) -> [str]:
        

        return [f.pathName for f in list(self._files.values())]
343281
def feature_files
      files_to_run = []

      @args.each do |arg|
        if arg.match(/\.feature/)
          if File.exists? arg.gsub(/:\d*/, '')
            files_to_run << arg
          else
            fail! "#{arg} could not be found"
          end
        elsif File.directory?(arg)
          files_to_run << Dir.glob(File.join(arg, '**', '*.feature'))
        elsif arg != "{}"
          fail! "invalid argument - #{arg}"
        end
      end

      if !files_to_run.empty?
        files_to_run.flatten
      else
        Dir.glob(File.join(Spinach.config[:features_path], '**', '*.feature'))
      end
    end
585176
def _load_names(self) -> List[str]:
        
        names = []
        for path in self._get_files():
            for name in self._get_names(path):
                names.append(self._normalize_name(name))
        return names
451002
def paths(self):
        """"""
        if self.format is None:
            raise ArcanaFileFormatError(
                "Cannot get paths of fileset ({}) that hasn't had its format "
                "set".format(self))
        if self.format.directory:
            return chain(*((op.join(root, f) for f in files)
                           for root, _, files in os.walk(self.path)))
        else:
            return chain([self.path], self.aux_files.values())
1255366
private void collectFeatureInfos(Map<String, ProductInfo> productInfos,
                                     Map<String, FeatureInfo> featuresBySymbolicName) {
        ManifestFileProcessor manifestFileProcessor = new ManifestFileProcessor();
        for (Map.Entry<String, Map<String, ProvisioningFeatureDefinition>> productEntry : manifestFileProcessor.getFeatureDefinitionsByProduct().entrySet()) {
            String productName = productEntry.getKey();
            Map<String, ProvisioningFeatureDefinition> features = productEntry.getValue();

            ContentBasedLocalBundleRepository repository;
            if (productName.equals(ManifestFileProcessor.CORE_PRODUCT_NAME)) {
                repository = BundleRepositoryRegistry.getInstallBundleRepository();
            } else if (productName.equals(ManifestFileProcessor.USR_PRODUCT_EXT_NAME)) {
                repository = BundleRepositoryRegistry.getUsrInstallBundleRepository();
            } else {
                repository = manifestFileProcessor.getBundleRepository(productName, null);
            }

            ProductInfo productInfo = new ProductInfo(repository);
            productInfos.put(productName, productInfo);

            for (Map.Entry<String, ProvisioningFeatureDefinition> featureEntry : features.entrySet()) {
                String featureSymbolicName = featureEntry.getKey();
                ProvisioningFeatureDefinition feature = featureEntry.getValue();

                FeatureInfo featureInfo = new FeatureInfo(productInfo, feature);
                featuresBySymbolicName.put(featureSymbolicName, featureInfo);

                String shortName = feature.getIbmShortName();
                if (shortName != null) {
                    productInfo.featuresByShortName.put(shortName, featureInfo);
                }
            }
        }
    }
1170372
def src_paths(self):
        
        return {src for src, summary in self._diff_violations().items()
                   if len(summary.measured_lines) > 0}
462121
def get_result_files(self, result):
        
        if isinstance(result, dict):
            result_id = result['meta']['id']
        else:  # Should already be a string containing the id
            result_id = result

        result_data_dir = os.path.join(self.get_data_dir(), result_id)

        filenames = next(os.walk(result_data_dir))[2]

        filename_path_pairs = [
            (f, os.path.join(self.get_data_dir(), result_id, f))
            for f in filenames]

        return {k: v for k, v in filename_path_pairs}
399472
def fetchFiles(self):
        """"""
        print("Fetching files from {}".format(self.baseDir))
        files = glob(path.join(self.baseDir, '*'))
        filesDef = []
        for f in files:
            print("Found SPARQL file {}".format(f))
            relative = f.replace(self.baseDir, '')
            filesDef.append({
                'download_url': relative,
                'name': relative
            })
        return filesDef
372638
def lint_file_paths(files, ext)
        file_list = files.map { |f| f[:filename] }.compact
        # Lints accept files differently
        ext == :ruby ? file_list.join(' ') : file_list.join(',')
      end