###. Copyright (C) The Arvados Authors. All rights reserved. .... .... SPDX-License-Identifier: CC-BY-SA-3.0 h1. Arvados documentation This is the source code for "doc.arvados.org":http://doc.arvados.org. Here's how to build the HTML pages locally so you can preview your updates before you commit and push. Additional information is available on the "'Documentation' page on the Arvados wiki":https://dev.arvados.org/projects/arvados/wiki/Documentation. h2. Install dependencies To build the core Arvados documentation:
arvados/doc$ sudo apt-get install build-essential libcurl4-openssl-dev libgnutls28-dev libssl-dev arvados/doc$ bundle installSDK reference documentation has additional, optional build requirements. h3. Java SDK documentation
$ sudo apt install gradleh3. Python SDK documentation
arvados/doc$ sudo apt install python3-venv arvados/doc$ python3 -m venv .venv arvados/doc$ .venv/bin/pip install pdoc setuptoolsThen you must activate the virtualenv (e.g., run @. .venv/bin/activate@) before you run the @bundle exec rake@ commands below. h3. R SDK documentation
$ sudo apt install r-cran-devtools r-cran-roxygen2 r-cran-knitr r-cran-markdown r-cran-xmlh2. Generate HTML pages
arvados/doc$ bundle exec rakeAlternately, to make the documentation browsable on the local filesystem:
arvados/doc$ bundle exec rake generate baseurl=$PWD/.siteh3. Selecting SDK documentation to build By default, the build process will try to detect what SDK documentation it can build, build all that, and skip the rest. You can specify exactly what you want to build using the @sdks@ environment variable. This is a list of comma- or space-separated SDKs you wanted to build documentation for. Valid values are @java@, @python@, @r@, @all@, or @none@. @all@ is a shortcut for listing all the valid SDKs. @none@ means do not build documentation for any SDK. For example, to build documentation for the Java and Python SDKs, but skip R:
arvados/doc$ bundle exec rake generate baseurl=$PWD/.site sdks=java,pythonSpecifying @sdks@ skips the build detection logic. If the Rakefile cannot build the requested SDK documentation, the build will fail. For backwards compatibility, if you do not specify @sdks@, but the @NO_SDK@ environment variable is set, or the @no-sdk@ file exists, the build will run as if you set @sdks=none@. h2. Run linkchecker If you have "Linkchecker":http://wummel.github.io/linkchecker/ installed on your system, you can run it against the documentation:
arvados/doc$ bundle exec rake linkchecker baseurl=file://$PWD/.sitePlease note that this will regenerate your $PWD/.site directory. h2. Preview HTML pages
arvados/doc$ bundle exec rake run [2014-03-10 09:03:41] INFO WEBrick 1.3.1 [2014-03-10 09:03:41] INFO ruby 2.1.1 (2014-02-24) [x86_64-linux] [2014-03-10 09:03:41] INFO WEBrick::HTTPServer#start: pid=8926 port=8000Preview the rendered pages at "http://localhost:8000":http://localhost:8000. h2. Publish HTML pages inside Workbench (or some other web site) You can set @baseurl@ (the URL prefix for all internal links), @arvados_cluster_uuid@, @arvados_api_host@ and @arvados_workbench_host@ without changing @_config.yml@:
arvados/doc$ bundle exec rake generate baseurl=/doc arvados_api_host=xyzzy.arvadosapi.comh2. Delete generated files
arvados/doc$ bundle exec rake realclean