Exemplo n.º 1
0
def _get_software_agent(pr):
    '''Get the seis-prov entity for the gmprocess software.

    Args:
        pr (prov.model.ProvDocument):
            Existing ProvDocument.

    Returns:
        prov.model.ProvDocument:
            Provenance document updated with gmprocess software name/version.
    '''
    software = 'gmprocess'
    version = get_versions()['version']
    hashstr = '0000001'
    agent_id = "seis_prov:sp001_sa_%s" % hashstr
    giturl = 'https://github.com/usgs/groundmotion-processing'
    pr.agent(agent_id,
             other_attributes=((
                 ("prov:label", software),
                 ("prov:type",
                  prov.identifier.QualifiedName(prov.constants.PROV,
                                                "SoftwareAgent")),
                 ("seis_prov:software_name", software),
                 ("seis_prov:software_version", version),
                 ("seis_prov:website",
                  prov.model.Literal(giturl, prov.constants.XSD_ANYURI)),
             )))
    return pr
def _get_software_agent(pr):
    '''Get the seis-prov entity for the gmprocess software.

    Args:
        pr (prov.model.ProvDocument):
            Existing ProvDocument.

    Returns:
        prov.model.ProvDocument:
            Provenance document updated with gmprocess software name/version.
    '''
    software = 'gmprocess'
    version = get_versions()['version']
    hashstr = '0000001'
    agent_id = "seis_prov:sp001_sa_%s" % hashstr
    giturl = 'https://github.com/usgs/groundmotion-processing'
    pr.agent(agent_id, other_attributes=((
        ("prov:label", software),
        ("prov:type", prov.identifier.QualifiedName(
            prov.constants.PROV, "SoftwareAgent")),
        ("seis_prov:software_name", software),
        ("seis_prov:software_version", version),
        ("seis_prov:website", prov.model.Literal(
            giturl,
            prov.constants.XSD_ANYURI)),
    )))
    return pr