Return a fully-qualified artifact string.
190680
def artifact_path(cls, project, incident, artifact):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/incidents/{incident}/artifacts/{artifact}",
            project=project,
            incident=incident,
            artifact=artifact,
        )
557721
def GetClassesByArtifact(cls, artifact_name):
    """"""
    return [
        cls.classes[c]
        for c in cls.classes
        if artifact_name in cls.classes[c].supported_artifacts
    ]
1188523
function artifact(the_token) {

// Return a string representing an artifact.

    if (the_token === undefined) {
        the_token = next_token;
    }
    return (
        (the_token.id === "(string)" || the_token.id === "(number)")
        ? String(the_token.value)
        : the_token.id
    );
}
508939
def list_built_artifacts(id, page_size=200, page_index=0, sort="", q=""):
    
    data = list_built_artifacts_raw(id, page_size, page_index, sort, q)
    if data:
        return utils.format_json_list(data)
90107
def Artifacts(self, os_name=None, cpe=None, label=None):
    
    return [
        c.artifact for c in self.conditions if c.Artifacts(os_name, cpe, label)
    ]
254227
public static String getFileName(MavenCoordinates artifact, Constants.ArtifactType type) {
		return artifact.getArtifactId() + "-" + artifact.getVersion() + type.getMavenFileExtension();
	}
49368
def getArtifactPath(self, artifact, suffix=None, extension="jar"):
        
        return os.path.join(self._rootPath, artifact.getPath(suffix, extension, os.sep))
449821
def get_build_artefacts(config):
    """"""

    def aux(ctx, service_name, service):
        compiler, environment = get_compiler(config, service)
        new_service, service_barts = compiler.getBuildArtefacts(environment, ctx, service)
        ctx = ctx + [service_name]
        for child_name, child in compiler.children(service):
            new_child, child_barts = aux(ctx, child_name, child)
            util.merge_into(service_barts, child_barts)
            new_service[child_name] = new_child
        return new_service, service_barts

    barts = {}
    new_config = {
        'environments': config['environments'],
    }
    for service_name, service in services(config):
        new_service, service_barts = aux([], service_name, service)
        new_config[service_name] = new_service
        util.merge_into(barts, service_barts)
    return new_config, barts
162948
def artifact_filename(self):
    
    def maybe_compenent(component):
      return '-{}'.format(component) if component else ''

    return '{org}-{name}{rev}{classifier}.{ext}'.format(org=self.org,
                                                        name=self.name,
                                                        rev=maybe_compenent(self.rev),
                                                        classifier=maybe_compenent(self.classifier),
                                                        ext=self.ext)
398623
@Override
    public File findArtifact(final Artifact artifact) {
        String type = artifact.getProperty("type", "jar");
        if ("ceylon-jar".equals(type) || "car".equals(type)) {
            if ("ceylon-jar".equals(type)) {
                type = "jar";
            }

            File art = new File(CeylonUtil.ceylonSystemFullPath(artifact, type));
            
            if (art.isFile()) {
            	 if (logger != null) {
            		 logger.info("Resolved from Ceylon repo: " + artifact);
            	 }
                artifact.setFile(art);
                return art;
            }
        } 
        return null;
    }
1147272
function determineArtifactName( generator ) {
   if( generator.name ) {
      return generator.name;
   }
   if( generator.env.cwd !== generator.destinationRoot() && generator.options.directory.length === 0) {
      var artifactPath = path.relative( generator.destinationRoot(), generator.env.cwd );
      return path.basename( artifactPath );
   }
   return '';
}
1117337
def get_artifact_metadata(self, package_name):
        

        filename = self.metadata.get(package_name)
        if not filename or not exists(filename):
            return {}
        with open(filename, encoding='utf8') as fd:
            contents = fd.read()

        try:
            is_json_compat(contents)
        except ValueError:
            logger.info("artifact metadata file '%s' is invalid", filename)
            return {}

        return json.loads(contents)
948000
def _get_spec(tree_base, spec, template, saltenv='base'):
    '''
    
    '''
    spec_tgt = os.path.basename(spec)
    dest = os.path.join(tree_base, 'SPECS', spec_tgt)
    return __salt__['cp.get_url'](
        spec,
        dest,
        saltenv=saltenv)
114978
def ReadAllArtifacts(self, cursor=None):
    """"""
    cursor.execute("SELECT definition FROM artifacts")
    return [_RowToArtifact(row) for row in cursor.fetchall()]
657969
def UsesArtifact(self, artifacts):
    
    # If artifact is a single string, see if it is in the list of artifacts
    # as-is. Otherwise, test whether any of the artifacts passed in to this
    # function exist in the list of artifacts.
    if isinstance(artifacts, string_types):
      return artifacts in self.artifacts
    else:
      return any(True for artifact in artifacts if artifact in self.artifacts)
1354075
def WriteArtifact(self, artifact):
    """"""
    name = str(artifact.name)

    if name in self.artifacts:
      raise db.DuplicatedArtifactError(name)

    self.artifacts[name] = artifact.Copy()
734898
def extract_text_log_artifacts(job_log):
    """"""

    # parse a log given its url
    artifact_bc = ArtifactBuilderCollection(job_log.url)
    artifact_bc.parse()

    artifact_list = []
    for name, artifact in artifact_bc.artifacts.items():
        artifact_list.append({
            "job_guid": job_log.job.guid,
            "name": name,
            "type": 'json',
            "blob": json.dumps(artifact)
        })

    return artifact_list