-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprov-python-short-tutorial.html
More file actions
120 lines (113 loc) · 7.95 KB
/
Copy pathprov-python-short-tutorial.html
File metadata and controls
120 lines (113 loc) · 7.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://gc.zgo.at https://giscus.app; connect-src 'self' https://trungdong.goatcounter.com; img-src 'self' https://trungdong.goatcounter.com; frame-src https://giscus.app https://player.vimeo.com; style-src 'self' 'unsafe-inline' https://giscus.app; base-uri 'none'; object-src 'none'; form-action 'none'"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Documentation is hard work! I started the work on the PROV Python package nearly three years ago and yet its documentation is still quite lacking. As a small effort to make up for it, I thought a...">
<meta property="og:site_name" content="Dong Huynh">
<meta property="og:type" content="article">
<meta property="og:title" content="A Short Tutorial for Prov Python">
<meta property="og:description" content="Documentation is hard work! I started the work on the PROV Python package nearly three years ago and yet its documentation is still quite lacking. As a small effort to make up for it, I thought a...">
<meta property="og:url" content="https://trungdong.github.io/prov-python-short-tutorial.html">
<meta property="og:image" content="https://trungdong.github.io/images/dong.huynh.cover.jpg">
<meta property="article:published_time" content="2014-08-07T23:42:26+01:00">
<meta name="twitter:card" content="summary">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "A Short Tutorial for Prov Python",
"description": "Documentation is hard work! I started the work on the PROV Python package nearly three years ago and yet its documentation is still quite lacking. As a small effort to make up for it, I thought a...",
"datePublished": "2014-08-07T23:42:26+01:00",
"author": {"@type": "Person", "@id": "https://trungdong.github.io/#person", "name": "Dong Huynh"},
"url": "https://trungdong.github.io/prov-python-short-tutorial.html",
"image": "https://trungdong.github.io/images/dong.huynh.cover.jpg"
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Person",
"@id": "https://trungdong.github.io/#person",
"name": "Dong Huynh",
"url": "https://trungdong.github.io/",
"image": "https://trungdong.github.io/images/dong.huynh.profile.jpg",
"sameAs": ["https://orcid.org/0000-0003-4937-2473", "https://scholar.google.co.uk/citations?user=d92eou8AAAAJ", "https://github.com/trungdong", "https://www.linkedin.com/in/donghuynh"]
}
</script>
<link rel="alternate" href="https://trungdong.github.io/feeds/all.atom.xml" type="application/atom+xml" title="Dong Huynh Full Atom Feed"/>
<title>A Short Tutorial for Prov Python // Dong Huynh</title>
<link rel="stylesheet" href="https://trungdong.github.io/theme/css/style.css">
<link rel="stylesheet" href="https://trungdong.github.io/theme/css/pygments.css">
</head>
<body>
<div id="layout">
<div class="sidebar sidebar-article">
<header class="header-article">
<h2 class="article-info"><a href="https://trungdong.github.io/author/dong-huynh.html" title="See posts by Dong Huynh">Dong Huynh</a></h2>
<h3 class="published-label">Published</h3>
<p><time datetime="2014-08-07T23:42:26+01:00">Thu 07 August 2014</time></p>
<a href="/">←Home</a>
</header>
</div>
<div class="main">
<main class="content">
<section class="post">
<header class="post-header">
<h1>A Short Tutorial for Prov Python</h1>
<p class="post-meta">
// under <a class="post-category" href="https://trungdong.github.io/tag/prov-json.html">PROV-JSON</a>
<a class="post-category" href="https://trungdong.github.io/tag/prov-n.html">PROV-N</a>
<a class="post-category" href="https://trungdong.github.io/tag/provpy.html">ProvPy</a>
<a class="post-category" href="https://trungdong.github.io/tag/provstore.html">ProvStore</a>
<a class="post-category" href="https://trungdong.github.io/tag/python.html">Python</a>
<a class="post-category" href="https://trungdong.github.io/tag/tutorial.html">tutorial</a>
</p>
</header>
</section>
<p>Documentation is hard work! I started the work on the <a href="https://pypi.python.org/pypi/prov/">PROV Python package</a> nearly <a href="https://github.com/trungdong/prov/graphs/contributors">three years ago</a> and yet its <a href="https://prov.readthedocs.io/">documentation</a> is still quite lacking. As a small effort to make up for it, I thought a simple tutorial might help a bit. </p>
<p>So here it is: <a href="https://nbviewer.org/github/trungdong/notebooks/blob/master/PROV%20Tutorial.ipynb">the first tutorial for PROV Python</a>! </p>
<p>It will guide you through:</p>
<ul>
<li>Installing the Prov package</li>
<li>Creating a PROV document in Python</li>
<li>Exporting the document into <a href="https://www.w3.org/TR/prov-n/">PROV-N</a> and <a href="https://www.w3.org/Submission/2013/SUBM-prov-json-20130424/">PROV-JSON</a></li>
<li>Displaying the document in a graphical format like the one on the right</li>
<li>Saving a provenance document in the cloud at ProvStore and retrieve it back</li>
</ul>
<p>All the above can be done in 10-15 minutes! </p>
<p>I hope you find <a href="https://nbviewer.org/github/trungdong/notebooks/blob/master/PROV%20Tutorial.ipynb">the tutorial</a> useful. Any suggestion or request, please do <a href="https://github.com/trungdong/notebooks/issues">let me know here</a>. </p>
<p><img alt="PROV-N JavaScript Editor Screenshot" src="https://trungdong.github.io/images/provbook-example.png" width="642" height="277"></p>
<p>PNG export of a simple example from the book <a href="https://www.provbook.org/">Provenance: An Introduction to PROV</a></p>
<p><em>Updated 27-Feb-2015</em>: I added a simple instruction in the tutorial showing how to read (i.e. deserialise) a PROV-JSON file into a ProvDocument instance. In addition, I simplified the section on interacting with ProvStore by using <a href="https://millar.io/">Sam Millar</a>'s <a href="https://github.com/millar/provstore-api">provstore-api</a> package.</p>
<p><em>Updated 12-Sep-2026</em>: ProvStore was retired in December 2024, so the tutorial's section on saving documents there no longer works. See <a href="https://trungdong.github.io/software.html">the software page</a> for its history.</p>
<div class="hr"></div>
<a href="#" class="go-top">Go Top</a>
<div class="comments">
<script src="https://giscus.app/client.js"
data-repo="trungdong/trungdong.github.io"
data-repo-id="MDEwOlJlcG9zaXRvcnk0MDY2MTE0Nw=="
data-category="Comments"
data-category-id="DIC_kwDOAmxwm84DFcBh"
data-mapping="pathname"
data-strict="1"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="top"
data-theme="preferred_color_scheme"
data-lang="en"
data-loading="lazy"
crossorigin="anonymous"
async>
</script>
<noscript>Comments are powered by <a href="https://giscus.app">giscus</a> and need JavaScript.</noscript>
</div><footer class="footer">
<p>© Dong Huynh –
Built for <a href="https://getpelican.com/">Pelican</a>
</p>
</footer> </main>
</div>
</div>
<script src="https://trungdong.github.io/theme/js/site.js" defer></script>
<script data-goatcounter="https://trungdong.goatcounter.com/count" async src="https://gc.zgo.at/count.js"></script></body>
</html>