docker/*/generated/*
docker/config.yml
doc/_site/*
-doc/.site/*
\ No newline at end of file
+doc/.site/*
+doc/sdk/python/arvados
\ No newline at end of file
gem 'zenweb'
gem 'liquid'
+gem 'RedCloth'
GEM
remote: https://rubygems.org/
specs:
+ RedCloth (4.2.9)
coderay (1.1.0)
kramdown (1.3.1)
less (1.2.21)
ruby
DEPENDENCIES
+ RedCloth
liquid
zenweb
#!/usr/bin/env rake
require "rubygems"
-require "zenweb/tasks"
+Rake.application.rake_require "zenweb/tasks"
load "zenweb-textile.rb"
load "zenweb-liquid.rb"
+file ".site/sdk/python/arvados/index.html" do |t|
+ sh "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
+end
+
+task :extra_wirings do
+ $website.pages["sdk/python/python.html.textile.liquid"].depends_on(".site/sdk/python/arvados/index.html")
+end
exclude: ["Rakefile", "tmp"]
baseurl: /doc
arvados_api_host: qr1hi.arvadosapi.com
-layout: default
+
navbar:
userguide:
- - Getting Started
- - Tutorials
- - Examples
- - Reference
- api:
- - Concepts
- - API Methods
- - Schema
+ - Getting Started:
+ - user/getting_started/workbench.html.textile.liquid
+ - user/getting_started/ssh-access.html.textile.liquid
+ - user/getting_started/check-environment.html.textile.liquid
+ - user/getting_started/community.html.textile.liquid
+ - Tutorials:
+ - user/tutorials/tutorial-keep.html.textile.liquid
+ - user/tutorials/tutorial-job1.html.textile.liquid
+ - user/tutorials/tutorial-firstscript.html.textile.liquid
+ - user/tutorials/tutorial-job-debug.html.textile.liquid
+ - user/tutorials/tutorial-new-pipeline.html.textile.liquid
+ - user/tutorials/tutorial-parallel.html.textile.liquid
+ - user/tutorials/tutorial-trait-search.html.textile.liquid
+ - user/tutorials/tutorial-gatk-variantfiltration.html.textile.liquid
+ - user/tutorials/running-external-program.html.textile.liquid
+ - Examples:
+ - user/examples/crunch-examples.html.textile.liquid
+ - Reference:
+ - user/reference/api-tokens.html.textile.liquid
+ - user/reference/sdk-cli.html.textile.liquid
sdk:
- - Python
+ - Python:
+ - sdk/python/sdk-python.html.textile.liquid
+ - sdk/python/python.html.textile.liquid
+ - sdk/python/crunch-utility-libraries.html.textile.liquid
+ api:
+ - Concepts:
+ - api/authentication.html.textile.liquid
+ - api/methods.html.textile.liquid
+ - api/resources.html.textile.liquid
+ - api/crunch-scripts.html.textile.liquid
+ - api/permission-model.html.textile.liquid
+ - API Methods:
+ - api/methods/api_client_authorizations.html.textile.liquid
+ - api/methods/api_clients.html.textile.liquid
+ - api/methods/authorized_keys.html.textile.liquid
+ - api/methods/collections.html.textile.liquid
+ - api/methods/groups.html.textile.liquid
+ - api/methods/humans.html.textile.liquid
+ - api/methods/jobs.html.textile.liquid
+ - api/methods/job_tasks.html.textile.liquid
+ - api/methods/keep_disks.html.textile.liquid
+ - api/methods/links.html.textile.liquid
+ - api/methods/logs.html.textile.liquid
+ - api/methods/nodes.html.textile.liquid
+ - api/methods/pipeline_instances.html.textile.liquid
+ - api/methods/pipeline_templates.html.textile.liquid
+ - api/methods/repositories.html.textile.liquid
+ - api/methods/specimens.html.textile.liquid
+ - api/methods/traits.html.textile.liquid
+ - api/methods/users.html.textile.liquid
+ - api/methods/virtual_machines.html.textile.liquid
+ - Schema:
+ - api/schema/ApiClientAuthorization.html.textile.liquid
+ - api/schema/ApiClient.html.textile.liquid
+ - api/schema/AuthorizedKey.html.textile.liquid
+ - api/schema/Collection.html.textile.liquid
+ - api/schema/CommitAncestor.html.textile.liquid
+ - api/schema/Commit.html.textile.liquid
+ - api/schema/Group.html.textile.liquid
+ - api/schema/Human.html.textile.liquid
+ - api/schema/Job.html.textile.liquid
+ - api/schema/JobTask.html.textile.liquid
+ - api/schema/KeepDisk.html.textile.liquid
+ - api/schema/Link.html.textile.liquid
+ - api/schema/Log.html.textile.liquid
+ - api/schema/Node.html.textile.liquid
+ - api/schema/PipelineInstance.html.textile.liquid
+ - api/schema/PipelineTemplate.html.textile.liquid
+ - api/schema/Repository.html.textile.liquid
+ - api/schema/Specimen.html.textile.liquid
+ - api/schema/Trait.html.textile.liquid
+ - api/schema/User.html.textile.liquid
+ - api/schema/VirtualMachine.html.textile.liquid
+ admin:
+ - Admin:
+ - admin/index.html.md.liquid
+ - admin/cheat_sheet.html.textile.liquid
+ installguide:
+ - Install:
+ - install/install-api-server.html.md.liquid
+ - install/index.html.md.liquid
+ - install/install-workbench-app.html.md.liquid
+ - install/client.html.textile.liquid
+ - install/create-standard-objects.html.textile.liquid
+ - install/install-crunch-dispatch.html.textile.liquid
--- /dev/null
+<div class="span3">
+ <div class="affix-top">
+ <div class="well sidebar-nav">
+ <ol class="nav nav-list">
+ {% for section in site.navbar[page.navsection] %}
+ {% for entry in section %}
+ <li><span class="nav-header">{{ entry[0] }}</span>
+ <ol class="nav nav-list">
+ {% for item in entry[1] %}
+ {% assign p = site.pages[item] %}
+ <li {% if p.url == page.url %} class="active activesubnav" {% elsif p.title == page.subnavsection %} class="activesubnav" {% endif %}>
+ <a href="{{ site.baseurl }}{{ p.url }}">{{ p.title }}</a></li>
+ {% endfor %}
+ </ol>
+ {% endfor %}
+ {% endfor %}
+ </ol>
+ </div>
+ </div>
+</div>
+++ /dev/null
- <div class="span3">
- <div class="affix-top">
- <div class="well sidebar-nav">
- {% if page.navsection == 'userguide' or page.navsection == 'api' or page.navsection == 'sdk' %}
- <ol class="nav nav-list">
- {% for menu_item in site.navbar[page.navsection] %}
- <li><span class="nav-header">{{ menu_item }}</span>
- <ol class="nav nav-list">
- {% for navorder in (0..99) %}
- {% for p in site.pages %}
- {% if p.navsection == page.navsection and p.navmenu == menu_item and p.navorder == navorder %}
- <li {% if p.url == page.url %} class="active activesubnav" {% elsif p.title == page.subnavsection %} class="activesubnav" {% endif %}><a href="{{ site.baseurl }}{{ p.url }}">{{ p.title }}</a></li>
- {% endif %}{% endfor %}{% endfor %}
- </ol>
- </li>
- {% endfor %}
- </ol>
- {% else %}
- <ol class="nav nav-list">
- {% for navorder in (0..99) %}{% for p in site.pages %}{% if p.navsection == page.navsection and p.navorder == navorder %}
- <li {% if p.url == page.url %} class="active activesubnav" {% elsif p.title == page.subnavsection %} class="activesubnav" {% endif %}><a href="{{ site.baseurl }}{{ p.url }}">{{ p.title }}</a></li>
- {% endif %}{% endfor %}{% endfor %}
- </ol>
- {% endif %}
- </div>
- </div>
- </div>
<![endif]-->
</head>
<body class="nopad">
- {% include navbar_top.html %}
+ {% include 'navbar_top' %}
{% if page.navsection == 'top' or page.no_nav_left %}
{{ content }}
<div class="container-fluid">
<div class="row-fluid">
- {% include navbar_left.html %}
+ {% include 'navbar_left' %}
<div class="span9"><div style="padding-left: 2em;">
{{ content }}
</div></div>
---
layout: default
-navsection: adminguide
+navsection: admin
title: Cheat Sheet
-navorder: 1
...
h1. Cheat Sheet
---
layout: default
-navsection: adminguide
+navsection: admin
title: Overview
-navorder: 0
...
-{% include alert-stub.html %}
+{% include 'alert_stub' %}
# Administration Overview
navsection: api
navmenu: Concepts
title: Authentication
-navorder: 2
+
...
h1. Authentication
navsection: api
navmenu: Concepts
title: Crunch scripts
-navorder: 5
+
...
h2. Crunch scripts
layout: default
navsection: api
title: API Reference
-navorder: 0
+
...
h1. API Reference
navsection: api
navmenu: Concepts
title: REST methods
-navorder: 3
+
...
h1. REST Methods
navsection: api
navmenu: API Methods
title: "api_client_authorizations"
-navorder: 1
+
...
h1. api_client_authorizations
navsection: api
navmenu: API Methods
title: "api_clients"
-navorder: 2
+
...
h1. api_clients
navsection: api
navmenu: API Methods
title: "authorized_keys"
-navorder: 3
+
...
h1. authorized_keys
navsection: api
navmenu: API Methods
title: "collections"
-navorder: 4
+
...
h1. collections
navsection: api
navmenu: API Methods
title: "groups"
-navorder: 5
+
...
h1. groups
navsection: api
navmenu: API Methods
title: "humans"
-navorder: 6
+
...
h1. humans
navsection: api
navmenu: API Methods
title: "job_tasks"
-navorder: 7
+
...
h1. job_tasks
navsection: api
navmenu: API Methods
title: "jobs"
-navorder: 8
+
...
h1. jobs
navsection: api
navmenu: API Methods
title: "keep_disks"
-navorder: 9
+
...
h1. keep_disks
navsection: api
navmenu: API Methods
title: "links"
-navorder: 10
+
...
h1. links
navsection: api
navmenu: API Methods
title: "logs"
-navorder: 11
+
...
h1. logs
navsection: api
navmenu: API Methods
title: "nodes"
-navorder: 12
+
...
h1. nodes
navsection: api
navmenu: API Methods
title: "pipeline_instances"
-navorder: 13
+
...
h1. pipeline_instances
navsection: api
navmenu: API Methods
title: "pipeline_templates"
-navorder: 14
+
...
h1. pipeline_templates
navsection: api
navmenu: API Methods
title: "repositories"
-navorder: 15
+
...
h1. repositories
navsection: api
navmenu: API Methods
title: "specimens"
-navorder: 16
+
...
h1. specimens
navsection: api
navmenu: API Methods
title: "traits"
-navorder: 17
+
...
h1. traits
navsection: api
navmenu: API Methods
title: "users"
-navorder: 18
+
...
h1. users
navsection: api
navmenu: API Methods
title: "virtual_machines"
-navorder: 19
+
...
h1. virtual_machines
navsection: api
navmenu: Concepts
title: "Permission model"
-navorder: 6
+
...
h1. Permission model
navsection: api
navmenu: Concepts
title: Resources
-navorder: 4
+
...
h1. Resources
navsection: api
navmenu: Schema
title: ApiClient
-navorder: 2
+
...
h1. ApiClient
navsection: api
navmenu: Schema
title: ApiClientAuthorization
-navorder: 1
+
...
h1. ApiClientAuthorization
navsection: api
navmenu: Schema
title: AuthorizedKey
-navorder: 3
+
...
h1. AuthorizedKey
navsection: api
navmenu: Schema
title: Collection
-navorder: 4
+
...
h1. Collection
navsection: api
navmenu: Schema
title: Commit
-navorder: 6
+
...
h1. Commit
navsection: api
navmenu: Schema
title: CommitAncestor
-navorder: 5
+
...
h1. CommitAncestor
navsection: api
navmenu: Schema
title: Group
-navorder: 7
+
...
h1. Group
navsection: api
navmenu: Schema
title: Human
-navorder: 8
+
...
h1. Human
navsection: api
navmenu: Schema
title: Job
-navorder: 9
+
...
h1. Job
navsection: api
navmenu: Schema
title: JobTask
-navorder: 10
+
...
h1. JobTask
navsection: api
navmenu: Schema
title: KeepDisk
-navorder: 11
+
...
h1. KeepDisk
navsection: api
navmenu: Schema
title: Link
-navorder: 12
+
...
h1. Link
navsection: api
navmenu: Schema
title: Log
-navorder: 14
+
...
h1. Log
navsection: api
navmenu: Schema
title: Node
-navorder: 15
+
...
h1. Node
navsection: api
navmenu: Schema
title: PipelineInstance
-navorder: 16
+
...
h1. PipelineInstance
navsection: api
navmenu: Schema
title: PipelineTemplate
-navorder: 17
+
...
h1. PipelineTemplate
navsection: api
navmenu: Schema
title: Repository
-navorder: 18
+
...
h1. Repository
navsection: api
navmenu: Schema
title: Specimen
-navorder: 19
+
...
h1. Specimen
navsection: api
navmenu: Schema
title: Trait
-navorder: 20
+
...
h1. Trait
navsection: api
navmenu: Schema
title: User
-navorder: 21
+
...
h1. User
navsection: api
navmenu: Schema
title: VirtualMachine
-navorder: 22
+
...
h1. VirtualMachine
outf = open(out_fname, 'w')
outf.write(
"""---
-layout: default
navsection: api
navmenu: API Methods
title: "{resource}"
---
layout: default
+no_nav_left: true
navsection: top
title: Arvados | Documentation
...
layout: default
navsection: installguide
title: Install client libraries
-navorder: 5
+
...
h1. Install client libraries
h3. Python
-{% include notebox-begin.html %}
+{% include 'notebox-begin' %}
The Python package includes the Python API client library module and the CLI utilities @arv-get@ and @arv-put@.
-{% include notebox-end.html %}
+{% include 'notebox-end' %}
Get the arvados source tree.
h3. Ruby
-{% include notebox-begin.html %}
+{% include 'notebox-begin' %}
The arvados package includes the Ruby client library module. The arvados-cli package includes the CLI utilities @arv@, @arv-run-pipeline-instance@, and @crunch-job@.
-{% include notebox-end.html %}
+{% include 'notebox-end' %}
notextile. <pre><code>$ <span class="userinput">sudo gem install arvados arvados-cli</span></code></pre>
layout: default
navsection: installguide
title: Create standard objects
-navorder: 4
+
...
h1. Create standard objects
layout: default
navsection: installguide
title: Overview
-navorder: 0
...
-{% include alert-stub.html %}
+{% include 'alert_stub' %}
# Installation Overview
navorder: 1
...
-{% include alert-stub.html %}
+{% include 'alert-stub' %}
# API server setup
layout: default
navsection: installguide
title: Install the Crunch dispatcher
-navorder: 3
+
...
h1. Crunch setup
navorder: 2
...
-{% include alert-stub.html %}
+{% include 'alert-stub' %}
# Workbench setup
layout: default
navsection: sdk
title: "SDK Reference"
-navorder: 0
+
...
h1. Arvados SDK Reference
navsection: sdk
navmenu: Python
title: "Crunch utility libraries"
-navorder: 20
+
...
h1. Crunch utility libraries
navsection: sdk
navmenu: Python
title: "PyDoc Reference"
-navorder: 30
+
no_nav_left: true
...
navsection: sdk
navmenu: Python
title: "Python SDK"
-navorder: 10
+
...
h1. Python SDK
navsection: userguide
navmenu: Examples
title: "Crunch examples"
-navorder: 30
+
...
h1. Crunch examples
navsection: userguide
navmenu: Getting Started
title: "Checking your environment"
-navorder: 10
+
...
h1. Checking your environment
navsection: userguide
navmenu: Getting Started
title: Arvados Community and Getting Help
-navorder: 11
+
...
h1. Arvados Community and Getting Help
navsection: userguide
navmenu: Getting Started
title: Accessing an Arvados VM over ssh
-navorder: 2
+
...
h1. Accessing an Arvados Virtual Machine over ssh
navsection: userguide
navmenu: Getting Started
title: Accessing Arvados Workbench
-navorder: 1
+
...
h1. Accessing Arvados Workbench
layout: default
navsection: userguide
title: Welcome to Arvados!
-navorder: 0
+
...
h1. Welcome to Arvados!
navsection: userguide
navmenu: Reference
title: "Getting an API token"
-navorder: 01
+
...
h1. Reference: Getting an API token
navsection: userguide
navmenu: Reference
title: "Command line interface"
-navorder: 22
+
...
h1. Reference: Command Line Interface
navsection: userguide
navmenu: Tutorials
title: "Running external programs"
-navorder: 18
+
...
h1. Running external programs
Next, using your favorite text editor, create a new file called @run-md5sum.py@ in the @crunch_scripts@ directory. Add the following code to use the @md5sum@ program to compute the hash of each file in a collection:
-<pre><code class="userinput">{% include run-md5sum.py %}</code></pre>
+<pre><code class="userinput">{% include 'run-md5sum_py' %}</code></pre>
Make the file executable:
navsection: userguide
navmenu: Tutorials
title: "Writing a Crunch script"
-navorder: 13
+
...
h1. Writing a Crunch script
This will create an git checkout in the directory called @you@.
-{% include notebox-begin.html %}
+{% include 'notebox-begin' %}
For more information about using @git@, try
notextile. <pre><code>$ <span class="userinput">man gittutorial</span></code></pre>
or <b>"click here to search Google for git tutorials":http://google.com/#q=git+tutorial</b>
-{% include notebox-end.html %}
+{% include 'notebox-end' %}
h2. Creating a Crunch script
Add the following code to compute the md5 hash of each file in a collection:
-<pre><code class="userinput">{% include tutorial_hash_script.py %}</code></pre>
+<pre><code class="userinput">{% include 'tutorial_hash_script_py' %}</code></pre>
Make the file executable:
navsection: userguide
navmenu: Tutorials
title: "Using GATK with Arvados"
-navorder: 16
+
...
h1. Using GATK with Arvados
navsection: userguide
navmenu: Tutorials
title: "Debugging a Crunch script"
-navorder: 14
+
...
h1. Debugging a Crunch script
navsection: userguide
navmenu: Tutorials
title: "Running a Crunch job"
-navorder: 12
+
...
h1. Running a crunch job
navsection: userguide
navmenu: Tutorials
title: "Storing and Retrieving data using Arvados Keep"
-navorder: 11
+
...
h1. Storing and Retrieving data using Arvados Keep
navsection: userguide
navmenu: Tutorials
title: "Constructing a Crunch pipeline"
-navorder: 15
+
...
h1. Constructing a Crunch pipeline
Our second script will filter the output of @parallel_hash.py@ and only include hashes that start with 0. Create a new script in @crunch_scripts/@ called @0-filter.py@:
-<pre><code class="userinput">{% include 0-filter.py %}</code></pre>
+<pre><code class="userinput">{% include '0-filter_py' %}</code></pre>
Now add it to git:
navsection: userguide
navmenu: Tutorials
title: "Parallel Crunch tasks"
-navorder: 15
+
...
h1. Parallel Crunch tasks
Next, using your favorite text editor, create a new file called @parallel-hash.py@ in the @crunch_scripts@ directory. Add the following code to compute the md5 hash of each file in a collection:
-<pre><code class="userinput">{% include parallel_hash_script.py %}</code></pre>
+<pre><code class="userinput">{% include 'parallel_hash_script_py' %}</code></pre>
Make the file executable:
navsection: userguide
navmenu: Tutorials
title: "Querying the Metadata Database"
-navorder: 16
+
...
h1. Querying the Metadata Database
end
module Zenweb
+
class Page
+
+ def render_liquid page, content
+ liquid self.body, content, page, binding
+ end
##
# Render a page's liquid and return the intermediate result
- def render_liquid page, content, binding = TOPLEVEL_BINDING
+ def liquid template, content, page, binding = TOPLEVEL_BINDING
require 'liquid'
+ Liquid::Template.file_system = Liquid::LocalFileSystem.new(File.join(File.dirname(Rake.application().rakefile), "_includes"))
+ unless defined? @liquid_template
+ @liquid_template = Liquid::Template.parse(template)
+ end
- unless defined? @liquid_template then
- @liquid_template = Liquid::Template.parse(content).render()
+ vars = {}
+ vars["content"] = content
+
+ vars["site"] = site.config.h.clone
+ pages = {}
+ site.pages.each do |f, p|
+ pages[f] = p.config.h.clone
+ pages[f]["url"] = p.url
end
+ vars["site"]["pages"] = pages
+
+ vars["page"] = page.config.h.clone
+ vars["page"]["url"] = page.url
- @liquid_template.render(binding)
+ @liquid_template.render(vars)
end
end
end
##
# Render a page's textile and return the resulting html
def render_textile page, content
- textile body
- end
-
- ##
- # Render textile in +content+
- def textile content
require 'RedCloth'
- @textile = RedCloth.new(content).to_html
+ RedCloth.new(content ? content : self.body).to_html
end
end
end