本文整理汇总了Python中biokbase.workspace.client.Workspace.get_object_provenance方法的典型用法代码示例。如果您正苦于以下问题:Python Workspace.get_object_provenance方法的具体用法?Python Workspace.get_object_provenance怎么用?Python Workspace.get_object_provenance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类biokbase.workspace.client.Workspace
的用法示例。
在下文中一共展示了Workspace.get_object_provenance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Workspace
# 需要导入模块: from biokbase.workspace.client import Workspace [as 别名]
# 或者: from biokbase.workspace.client.Workspace import get_object_provenance [as 别名]
1, est.strftime('%Y-%m-%dT%H:%M:%S+0000'))
else:
logger.info("Workspace objects transformed to {0}".format(external_type))
#
# TODO validation of data files after transform
#
# Step 2: Extract provenance and metadata
try:
workspaceClient = Workspace(url=workspace_service_url, token=kb_token)
object_info = {"workspace": workspace_name, "name": object_name}
object_details = dict()
object_details["provenance"] = workspaceClient.get_object_provenance([object_info])
object_details["metadata"] = workspaceClient.get_object_info_new({"objects":[object_info], "includeMetadata":1})
#logger.debug(object_details["metadata"])
# redundant information
#object_details["references"] = workspaceClient.list_referencing_objects([object_info])
# seems like maybe too crazy per download
#object_details["history"] = workspaceClient.get_object_history(object_info)
object_version = object_details["metadata"][0][4]
object_metadata_filename = "KBase_object_details_{0}_{1}_v{2}.json".format(workspace_name, object_name, object_version)
file_name = os.path.join(transform_directory, object_metadata_filename)