-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprov-python-short-tutorial.html
More file actions
132 lines (122 loc) · 7.18 KB
/
Copy pathprov-python-short-tutorial.html
File metadata and controls
132 lines (122 loc) · 7.18 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
121
122
123
124
125
126
127
128
129
130
131
132
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Dong Huynh, ">
<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="//cdnjs.cloudflare.com/ajax/libs/pure/0.3.0/pure-min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://trungdong.github.io/theme/css/pure.css">
<link rel="stylesheet" href="https://trungdong.github.io/theme/css/pygments.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fitvids/1.0.1/jquery.fitvids.min.js"></script>
<script>
$(document).ready(function(){
$(".content").fitVids();
});
</script>
</head>
<body>
<div class="pure-g-r" id="layout">
<div class="sidebar sidebar-article pure-u">
<header class="header-article">
<hgroup>
<a href="https://trungdong.github.io/author/dong-huynh.html" title="See posts by Dong Huynh">
</a>
<h2 class="article-info">Dong Huynh</h2>
<small class="about-author"></small>
<h5>Published</h5>
<p>Thu 07 August 2014</p>
<a href="/">←Home</a>
</hgroup>
</header>
</div>
<div class="pure-u">
<div 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="http://prov.readthedocs.org/">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="http://nbviewer.ipython.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="http://www.w3.org/TR/prov-n/">PROV-N</a> and <a href="http://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 <a href="https://openprovenance.org/store/">ProvStore</a> 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="http://nbviewer.ipython.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>.<a href="https://www.blogger.com/"></a> </p>
<p><img alt="PROV-N JavaScript Editor Screenshot" src="https://trungdong.github.io/images/provbook-example.png"></p>
<p>PNG export of a simple example from the book <a href="http://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 <a href="https://openprovenance.org/store/">ProvStore</a> by using <a href="http://millar.io/">Sam Millar</a>'s <a href="https://github.com/millar/provstore-api">provstore-api</a> package.</p>
<div class="hr"></div>
<a href="#" class="go-top">Go Top</a>
<div class="comments">
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = "trungdong-github-io"; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div><footer class="footer">
<p>© Dong Huynh –
Built with <a href="https://github.com/PurePelicanTheme/pure">Pure Theme</a>
for <a href="http://blog.getpelican.com/">Pelican</a>
</p>
</footer> </div>
</div>
</div>
<script>
var $top = $('.go-top');
// Show or hide the sticky footer button
$(window).scroll(function() {
if ($(this).scrollTop() > 200) {
$top.fadeIn(200);
} else {
$top.fadeOut(200);
}
});
// Animate the scroll to top
$top.click(function(event) {
event.preventDefault();
$('html, body').animate({scrollTop: 0}, 300);
})
// Makes sure that the href="#" attached to the <a> elements
// don't scroll you back up the page.
$('body').on('click', 'a[href="#"]', function(event) {
event.preventDefault();
});
</script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-264417-8");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>