[arvados] created: 2.7.0-6048-g810846168f

git repository hosting git at public.arvados.org
Thu Feb 22 20:02:53 UTC 2024


        at  810846168f8e14f63caefac534b843b7681b881f (commit)


commit 810846168f8e14f63caefac534b843b7681b881f
Author: Brett Smith <brett.smith at curii.com>
Date:   Thu Feb 22 14:48:04 2024 -0500

    21494: Adapt linkchecker arguments to built SDKs
    
    This lets you build a subset of SDK documentation, linkcheck it, and get
    an accurate result.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/doc/Rakefile b/doc/Rakefile
index c4e26cfb3b..3ec494f57d 100644
--- a/doc/Rakefile
+++ b/doc/Rakefile
@@ -19,6 +19,8 @@
 #
 # and then visit http://localhost:8000 in a browser.
 
+require "uri"
+
 require "rubygems"
 require "colorize"
 
@@ -31,18 +33,30 @@ def can_run?(*command, **options)
 end
 
 class JavaSDK
+  def self.build_path
+    "sdk/java-v2"
+  end
+
   def self.can_build?
     can_run?("gradle", "--version")
   end
 end
 
 class PythonSDK
+  def self.build_path
+    "sdk/python/arvados"
+  end
+
   def self.can_build?
     can_run?("./pysdk_pdoc.py", "--version")
   end
 end
 
 class RSDK
+  def self.build_path
+    "sdk/R"
+  end
+
   def self.can_build?
     can_run?("R", "--version")
   end
@@ -196,8 +210,17 @@ end
 
 task :linkchecker => [ :generate ] do
   # we need --check-extern to check relative links, weird but true
+  opts = [
+    "--check-extern",
+    "--ignore-url=!^file://",
+  ]
+  ([JavaSDK, PythonSDK, RSDK] - $build_sdks).map(&:build_path).each do |sdk_path|
+    sdk_url = URI.join(ENV["baseurl"], sdk_path)
+    url_re = Regexp.escape(sdk_url.to_s)
+    opts << "--ignore-url=^#{url_re}[./]"
+  end
   result = system(
-    "linkchecker", "index.html", "--check-extern", "--ignore-url=!file://",
+    "linkchecker", *opts, "index.html",
     chdir: ".site",
   )
   if result.nil?

commit 58d07b5b2d77550e500212f6c8a8fd082d72e597
Author: Brett Smith <brett.smith at curii.com>
Date:   Thu Feb 22 14:25:05 2024 -0500

    21494: Run linkchecker task unconditionally
    
    This better matches the new behavior of SDK doc build tasks. It also
    just makes sense IMO: linkchecker never runs implicitly, only when you
    request it, so if it can't do what you asked I think that should count
    as failure.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/doc/Rakefile b/doc/Rakefile
index 6b1b0d2ac3..c4e26cfb3b 100644
--- a/doc/Rakefile
+++ b/doc/Rakefile
@@ -195,15 +195,16 @@ file "sdk/java-v2/javadoc/index.html" do |t|
 end
 
 task :linkchecker => [ :generate ] do
-  if !can_run?("linkchecker", "--version")
-    puts "Warning: linkchecker not found, skipping run".colorize(:light_red)
-    next
-  end
   # we need --check-extern to check relative links, weird but true
-  system(
+  result = system(
     "linkchecker", "index.html", "--check-extern", "--ignore-url=!file://",
     chdir: ".site",
-  ) or exit $?.exitstatus
+  )
+  if result.nil?
+    fail "could not run linkchecker command (is it installed?)"
+  elsif !result
+    fail "linkchecker exited #{$?.exitstatus}"
+  end
 end
 
 task :import_vscode_training do

commit a7a6c3931e0ec3fad3034b1c457407fb13861633
Author: Brett Smith <brett.smith at curii.com>
Date:   Thu Feb 22 14:08:48 2024 -0500

    21494: Support arguments to doc tests
    
    Mainly for the new `sdks` environment variable.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/build/run-tests.sh b/build/run-tests.sh
index bd13bb22d9..17728c5342 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -993,7 +993,7 @@ test_doc() {
         ARVADOS_API_HOST=pirca.arvadosapi.com
         # Make sure python-epydoc is installed or the next line won't
         # do much good!
-        PYTHONPATH=$WORKSPACE/sdk/python/ "$bundle" exec rake linkchecker baseurl=file://$WORKSPACE/doc/.site/ arvados_workbench_host=https://workbench.$ARVADOS_API_HOST arvados_api_host=$ARVADOS_API_HOST
+        PYTHONPATH=$WORKSPACE/sdk/python/ "$bundle" exec rake linkchecker baseurl=file://$WORKSPACE/doc/.site/ arvados_workbench_host=https://workbench.$ARVADOS_API_HOST arvados_api_host=$ARVADOS_API_HOST ${testargs[doc]}
     )
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list