[ARVADOS] updated: 1.1.3-271-g295676c
Git user
git at public.curoverse.com
Thu Apr 19 15:48:38 EDT 2018
Summary of changes:
doc/Rakefile | 52 +++++++++++++++++++++++++++++++++++--
doc/_config.yml | 3 ++-
doc/sdk/R/index.html.textile.liquid | 15 -----------
sdk/R/createDoc.R | 7 ++---
4 files changed, 56 insertions(+), 21 deletions(-)
delete mode 100644 doc/sdk/R/index.html.textile.liquid
via 295676cd2bccb06c3d1b56ff749c37371739f069 (commit)
from be671e455b11f50af965923b980977264a8d7364 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 295676cd2bccb06c3d1b56ff749c37371739f069
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Thu Apr 19 15:47:23 2018 -0400
13076: R SDK online docs include both README and method docs.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/doc/Rakefile b/doc/Rakefile
index 4870eb1..4ba2f1a 100644
--- a/doc/Rakefile
+++ b/doc/Rakefile
@@ -28,11 +28,59 @@ end
file "sdk/R/arvados/index.html" do |t|
`which R`
if $? == 0
+ tgt = Dir.pwd
+ Dir.mkdir("sdk/R/arvados")
+ docfiles = []
Dir.chdir("../sdk/R/") do
- STDERR.puts `Rscript createDoc.R README.Rmd index.html 2>&1`
+ STDERR.puts `Rscript createDoc.R README.Rmd #{tgt}/sdk/R/README.md 2>&1`
+ Dir.entries("man").each do |rd|
+ if rd[-3..-1] == ".Rd"
+ htmlfile = "#{rd[0..-4]}.html"
+ `R CMD Rdconv -t html man/#{rd} > #{tgt}/sdk/R/arvados/#{htmlfile}`
+ docfiles << htmlfile
+ end
+ end
end
raise if $? != 0
- cp_r("../sdk/R/README.html", "sdk/R/")
+
+ File.open("sdk/R/README.md", "r") do |rd|
+ File.open("sdk/R/index.html.md", "w") do |fn|
+ fn.write(<<-EOF
+---
+layout: default
+navsection: sdk
+navmenu: R
+title: "R SDK Overview"
+...
+
+#{rd.read.gsub("```", "\n~~~\n").gsub(/^[ ]+/, "")}
+EOF
+ )
+ end
+ end
+
+ File.open("sdk/R/arvados/index.html.textile.liquid", "w") do |fn|
+ fn.write(<<-EOF
+---
+layout: default
+navsection: sdk
+navmenu: R
+title: "R Reference"
+...
+{% comment %}
+Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: CC-BY-SA-3.0
+{% endcomment %}
+
+EOF
+ )
+
+ docfiles.sort.each do |d|
+ fn.write("* \"#{d[0..-6]}\":#{d}\n")
+ end
+
+ end
else
puts "Warning: R not found, R documentation will not be generated".colorize(:light_red)
end
diff --git a/doc/_config.yml b/doc/_config.yml
index 011be51..a188598 100644
--- a/doc/_config.yml
+++ b/doc/_config.yml
@@ -105,7 +105,8 @@ navbar:
- sdk/go/index.html.textile.liquid
- sdk/go/example.html.textile.liquid
- R:
- - sdk/R/index.html.textile.liquid
+ - sdk/R/index.html.md
+ - sdk/R/arvados/index.html.textile.liquid
- Perl:
- sdk/perl/index.html.textile.liquid
- sdk/perl/example.html.textile.liquid
diff --git a/doc/sdk/R/index.html.textile.liquid b/doc/sdk/R/index.html.textile.liquid
deleted file mode 100644
index 1d7803a..0000000
--- a/doc/sdk/R/index.html.textile.liquid
+++ /dev/null
@@ -1,15 +0,0 @@
----
-layout: default
-navsection: sdk
-navmenu: R
-title: "R Reference"
-
-no_nav_left: true
-...
-{% comment %}
-Copyright (C) The Arvados Authors. All rights reserved.
-
-SPDX-License-Identifier: CC-BY-SA-3.0
-{% endcomment %}
-
-notextile. <iframe src="README.html" style="width:100%; height:100%; border:none" />
diff --git a/sdk/R/createDoc.R b/sdk/R/createDoc.R
index 8d4c5ba..73e088e 100644
--- a/sdk/R/createDoc.R
+++ b/sdk/R/createDoc.R
@@ -12,8 +12,9 @@ inputFile <- args[[1]] # .Rmd file
outputFile <- args[[2]] # .html file
# Create and fill temp .md file from existing .Rmd file
-tempMdFile <- tempfile("tempREADME", fileext = "md")
-knitr::knit(inputFile, tempMdFile)
+#tempMdFile <- tempfile("tempREADME", fileext = "md")
+knitr::knit(inputFile, outputFile)
+#knitr::knit(inputFile, tempMdFile)
# Generate HTML from temporary .md file
-markdown::markdownToHTML(tempMdFile, outputFile)
+#markdown::markdownToHTML(tempMdFile, outputFile)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list