return the file name for source model xml files of nested sources
178953
def nested_srcmdl_xml(self, **kwargs):
        
        kwargs_copy = self.base_dict.copy()
        kwargs_copy.update(**kwargs)
        self._replace_none(kwargs_copy)        
        localpath = NameFactory.nested_srcmdl_xml_format.format(**kwargs_copy)
        if kwargs.get('fullpath', False):
            return self.fullpath(localpath=localpath)
        return localpath
1329856
def source_path options={}
      @source_path ||= if options[:relative]
        File.join collection_path, "#{self.id}.md"
      else
        File.join root_path, collection_path, "#{self.id}.md"
      end
    end
650689
def get_fields(self):
        
        prefix = getattr(self.Meta, 'source_prefix', '')
        fields = super(ModelSubSerializer, self).get_fields()
        fields_without_prefix = OrderedDict()
        for field_name, field in fields.items():
            if field_name.startswith(prefix):
                # Set real model field name as field's `source` unless the
                # source is already explicitly set, in which case it is
                # probably a method name not the direct field name
                if not field.source:
                    field.source = field_name
                field_name = field_name[len(prefix):]
            fields_without_prefix[field_name] = field
        return fields_without_prefix
1240665
function buildDependencyTreeFromSources(filenames, sourcesObject) {
  const orgnizedFlat = {};

  // build tree object
  filenames.forEach(sourceFileName => {
    orgnizedFlat[sourceFileName] = {
      path: sourceFileName,
      source: sourcesObject[sourceFileName],
      dependencies: buildDependencyTreeFromSources(allImportPaths(sourcesObject[sourceFileName]), sourcesObject),
    };
  });

  // return organized object
  return orgnizedFlat;
}
1238604
def get_raw_gids(model_params):
    '''
    
    '''
    gidfile = open(os.path.join(model_params.raw_nest_output_path,
                                model_params.GID_filename), 'r') 
    gids = [] 
    for l in gidfile :
        a = l.split()
        gids.append([int(a[0]),int(a[1])])
    return gids
835220
def get_joined_file_name(self, atts, optional_atts = None):
        

        return '_'.join(
            [getattr(self, x) for x in atts] +
            [getattr(self, x) for x in optional_atts if x in self.__dict__]
        ) + '.nc'
61685
def get_xmldoc_path(self, filepath):
        """"""
        segs = filepath.split(".")
        segs.pop()
        return ".".join(segs) + ".xml"
530477
def get_new_filename(self, name: str) -> str:
        
        nonce = get_random_string(length=8)
        return '%s-%s/%s/%s.%s.%s' % (
            self.obj._meta.model_name, self.attribute_name,
            self.obj.pk, name, nonce, name.split('.')[-1]
        )
992249
def getFilename(self):
        """"""
        return os.path.abspath(os.path.join(self.basepath, 'dailydose.rss'))
1059942
public static String getFileName(final ConfigurationSourceKey source){
		//ensure an exception is thrown if we are not file.
		if (source.getType()!=ConfigurationSourceKey.Type.FILE)
			throw new AssertionError("Can only load configuration sources with type "+ConfigurationSourceKey.Type.FILE);
		return source.getName()+ '.' +source.getFormat().getExtension();
	}
1055386
def get_file_named(self, fldr, xtn):
        
        res = []       # list of Sample objects
        for root, _, files in os.walk(fldr):
            for basename in files:
                if fnmatch.fnmatch(basename, xtn):
                    filename = os.path.join(root, basename)
                    res.append(filename)

        if len(res) > 0:   
            return res[0]
        else:
            return None
513890
def get_xml_child(source, path):
  
  if isinstance(path, (tuple, list)):
    return source.find(*path)
  else:
    return source.find(path)
771895
function getVersionSCXML(machineName, versionKey) {
        let route = getVersionModelRoute(machineName, versionKey);
        return fs.readFileSync(repositoryPath + "/" + route).toString('utf8');
    }
475440
def get_paths(rlz):
    
    dic = {}
    if hasattr(rlz, 'sm_lt_path'):  # composite realization
        dic['source_model_tree_path'] = '_'.join(rlz.sm_lt_path)
        dic['gsim_tree_path'] = '_'.join(rlz.gsim_lt_path)
    else:  # simple GSIM realization
        dic['source_model_tree_path'] = ''
        dic['gsim_tree_path'] = '_'.join(rlz.lt_path)
    return dic
718722
def extract_runs_from_xml(self, sourcefilesTagList, global_required_files_pattern):
        '''
        
        '''
        base_dir = self.benchmark.base_dir
        # runs are structured as sourcefile sets, one set represents one sourcefiles tag
        blocks = []

        for index, sourcefilesTag in enumerate(sourcefilesTagList):
            sourcefileSetName = sourcefilesTag.get("name")
            matchName = sourcefileSetName or str(index)
            if self.benchmark.config.selected_sourcefile_sets \
                and not any(util.wildcard_match(matchName, sourcefile_set) for sourcefile_set in self.benchmark.config.selected_sourcefile_sets):
                    continue

            required_files_pattern = global_required_files_pattern.union(
                set(tag.text for tag in sourcefilesTag.findall('requiredfiles')))

            # get lists of filenames
            task_def_files = self.get_task_def_files_from_xml(sourcefilesTag, base_dir)

            # get file-specific options for filenames
            fileOptions = util.get_list_from_xml(sourcefilesTag)
            propertyfile = util.text_or_none(util.get_single_child_from_xml(sourcefilesTag, PROPERTY_TAG))

            # some runs need more than one sourcefile,
            # the first sourcefile is a normal 'include'-file, we use its name as identifier
            # for logfile and result-category all other files are 'append'ed.
            appendFileTags = sourcefilesTag.findall("append")

            currentRuns = []
            for identifier in task_def_files:
                if identifier.endswith('.yml'):
                    if appendFileTags:
                        raise BenchExecException(
                            "Cannot combine <append> and task-definition files in the same <tasks> tag.")
                    run = self.create_run_from_task_definition(
                        identifier, fileOptions, propertyfile, required_files_pattern)
                else:
                    run = self.create_run_for_input_file(
                        identifier, fileOptions, propertyfile, required_files_pattern, appendFileTags)
                if run:
                    currentRuns.append(run)

            # add runs for cases without source files
            for run in sourcefilesTag.findall("withoutfile"):
                currentRuns.append(Run(run.text, [], fileOptions, self, propertyfile, required_files_pattern))

            blocks.append(SourcefileSet(sourcefileSetName, index, currentRuns))

        if self.benchmark.config.selected_sourcefile_sets:
            for selected in self.benchmark.config.selected_sourcefile_sets:
                if not any(util.wildcard_match(sourcefile_set.real_name, selected) for sourcefile_set in blocks):
                    logging.warning(
                        'The selected tasks "%s" are not present in the input file, '
                        'skipping them.',
                        selected)
        return blocks
676724
def get_xml_text(source, path=None):
  
  if path is None:
    return source.text
  else:
    return get_xml_text(get_xml_child(source, path))
902889
def get_source_file_provenance(self, filename):
        """"""
        module_name = resolve.infer_module_name(filename, self.path)
        return resolve.Direct(filename, module_name)