예제 #1
0
def collections():
    g = ProvBundle()
    ex = Namespace('ex', 'http://example.org/')
    
    c1 = g.collection(ex['c1'])
    e1 = g.entity('ex:e1')
    g.hadMember(c1, e1)
    
    return g
예제 #2
0
파일: examples.py 프로젝트: satra/prov
def collections():
    g = ProvBundle()
    ex = Namespace("ex", "http://example.org/")

    c1 = g.collection(ex["c1"])
    e1 = g.entity("ex:e1")
    g.hadMember(c1, e1)

    return g
예제 #3
0
def export(trial: Trial, document: provo.ProvBundle):
    print_msg("  Exporting module dependencies")

    collection = document.collection("moduleDependencies")

    for module in trial.modules:  # type: Module
        _create_module_dep(module, document)

    for module in trial.modules:  # type: Module
        collection.hadMember("module{}".format(module.id))
예제 #4
0
def export(trial: Trial, document: provo.ProvBundle):
    print_msg("  Exporting environment conditions")

    collection = document.collection("environmentAttributes")

    for env_attr in trial.environment_attrs:  # type: EnvironmentAttr
        _create_env_attr(document, env_attr)

    for env_attr in trial.environment_attrs:  # type: EnvironmentAttr
        collection.hadMember("environmentAttribute{}".format(env_attr.id))