workbench: Improve integration test Rails launch.
[arvados.git] / doc / Rakefile
index 65d285507786f9e20c0d95caf2b45cd6acdb5b35..d8af62f5e33b0bbae7a619044c3ce08739e01b0c 100644 (file)
@@ -1,7 +1,34 @@
 #!/usr/bin/env rake
 
 require "rubygems"
+require "colorize"
+
+task :generate do
+  vars = ['baseurl', 'arvados_api_host', 'arvados_workbench_host']
+  vars.each do |v|
+    if ENV[v]
+      website.config.h[v] = ENV[v]
+    end
+  end
+end
+
 require "zenweb/tasks"
 load "zenweb-textile.rb"
 load "zenweb-liquid.rb"
 
+file "sdk/python/arvados/index.html" do |t|
+  `which epydoc`
+  if $? == 0
+    `epydoc --html -o sdk/python/arvados arvados`
+    Dir["sdk/python/arvados/*"].each do |f|
+      puts f
+      $website.pages[f] = Zenweb::Page.new($website, f)
+    end
+  else
+    puts "Warning: epydoc not found, Python documentation will not be generated".colorize(:light_red)
+  end
+end
+
+task :extra_wirings do
+  $website.pages["sdk/python/python.html.textile.liquid"].depends_on("sdk/python/arvados/index.html")
+end