4233: bug fix - rounding errors were causing us to miss maxima scrolling off the...
[arvados.git] / doc / Rakefile
1 #!/usr/bin/env rake
2
3 require "rubygems"
4 require "colorize"
5
6 task :generate => [ :realclean, 'sdk/python/arvados/index.html' ] do
7   vars = ['baseurl', 'arvados_api_host', 'arvados_workbench_host']
8   vars.each do |v|
9     if ENV[v]
10       website.config.h[v] = ENV[v]
11     end
12   end
13 end
14
15 file "sdk/python/arvados/index.html" do |t|
16   `which epydoc`
17   if $? == 0
18     `epydoc --html --parse-only -o sdk/python/arvados ../sdk/python/arvados/`
19   else
20     puts "Warning: epydoc not found, Python documentation will not be generated".colorize(:light_red)
21   end
22 end
23
24 task :linkchecker => [ :generate ] do
25   Dir.chdir(".site") do
26     `which linkchecker`
27     if $? == 0
28       system "linkchecker index.html --ignore-url='!file://'" or exit $?.exitstatus
29     else
30       puts "Warning: linkchecker not found, skipping run".colorize(:light_red)
31     end
32   end
33 end
34
35 task :clean do
36   rm_rf "sdk/python/arvados"
37 end
38
39 require "zenweb/tasks"
40 load "zenweb-textile.rb"
41 load "zenweb-liquid.rb"
42
43 task :extra_wirings do
44   $website.pages["sdk/python/python.html.textile.liquid"].depends_on("sdk/python/arvados/index.html")
45 end