From 805ff4c2a5efd4d3e5ce5367c59f22d792a8acd1 Mon Sep 17 00:00:00 2001 From: Stephen Herbener Date: Mon, 9 Nov 2020 14:59:20 -0700 Subject: [PATCH 01/10] Added ReadTheDocs config to install git-lfs so that images stored in git-lfs can be rendered properly. --- docs/conf.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 2d17ee64..17b66453 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,7 +21,6 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) - # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -172,4 +171,27 @@ ] +# Workaround to install and execute git-lfs on Read the Docs +import os +import shutil +gitLfsVersion = "2.11.0" +if not shutil.which('git-lfs'): + print("Need to install and initialize git lfs") + tarFile = "git-lfs-linux-amd64-v" + gitLfsVersion + ".tar.gz" + downLoadUrl = "https://github.com/git-lfs/git-lfs/releases/download/v" + \ + gitLfsVersion + "/" + tarFile + print(" tar file: ", tarFile) + print(" download URL: ", downLoadUrl) + print("") + + print("Running:") + osCmd = "wget " + downLoadUrl # download git-lfs from github + os.system(osCmd) + + osCmd = "tar xvzf " + tarFile # unpack the tar file + os.system(osCmd) + + os.system('./git-lfs install') # make lfs available in current repository + os.system('./git-lfs fetch') # download content from remote + os.system('./git-lfs checkout') # make local files to have the real content on them From 69d26e0f3249c2a33f2c7c2a3b73decc7a3da69f Mon Sep 17 00:00:00 2001 From: Stephen Herbener Date: Mon, 9 Nov 2020 15:20:56 -0700 Subject: [PATCH 02/10] debugging --- docs/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 17b66453..a9232682 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -191,6 +191,8 @@ osCmd = "tar xvzf " + tarFile # unpack the tar file os.system(osCmd) + os.system('git remote -v') + os.system('./git-lfs install') # make lfs available in current repository os.system('./git-lfs fetch') # download content from remote os.system('./git-lfs checkout') # make local files to have the real content on them From ed05b88529d0351390a15b9d00ab9c8e439f604e Mon Sep 17 00:00:00 2001 From: Stephen Herbener Date: Mon, 9 Nov 2020 17:02:32 -0700 Subject: [PATCH 03/10] debugging --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index a9232682..2a5d9157 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -192,6 +192,7 @@ os.system(osCmd) os.system('git remote -v') + os.system('./git-lfs env') os.system('./git-lfs install') # make lfs available in current repository os.system('./git-lfs fetch') # download content from remote From 9858d3cd808b4adf3e4a2cc814a25e5fdb868d99 Mon Sep 17 00:00:00 2001 From: Stephen Herbener Date: Mon, 9 Nov 2020 17:33:38 -0700 Subject: [PATCH 04/10] debugging --- docs/conf.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 2a5d9157..17b66453 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -191,9 +191,6 @@ osCmd = "tar xvzf " + tarFile # unpack the tar file os.system(osCmd) - os.system('git remote -v') - os.system('./git-lfs env') - os.system('./git-lfs install') # make lfs available in current repository os.system('./git-lfs fetch') # download content from remote os.system('./git-lfs checkout') # make local files to have the real content on them From 40a820268a5e246131d3d79cdc5dc828f5ad4880 Mon Sep 17 00:00:00 2001 From: Stephen Herbener Date: Mon, 9 Nov 2020 17:43:25 -0700 Subject: [PATCH 05/10] debugging --- docs/conf.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 17b66453..064956f9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -182,16 +182,28 @@ gitLfsVersion + "/" + tarFile print(" tar file: ", tarFile) print(" download URL: ", downLoadUrl) - print("") - print("Running:") - osCmd = "wget " + downLoadUrl # download git-lfs from github + # download git-lfs from github + osCmd = "wget " + downLoadUrl os.system(osCmd) - osCmd = "tar xvzf " + tarFile # unpack the tar file + # unpack the tar file + osCmd = "tar xvzf " + tarFile os.system(osCmd) - os.system('./git-lfs install') # make lfs available in current repository - os.system('./git-lfs fetch') # download content from remote - os.system('./git-lfs checkout') # make local files to have the real content on them + # make lfs available in current repository + os.system('./git-lfs install') + + # configure for lfs processes + os.system('git config filter.lfs.process = "./git-lfs filter-process"') + os.system('git config filter.lfs.smudge = "./git-lfs smudge -- %f"') + os.system('git config filter.lfs.clean = "./git-lfs clean -- %f"') + + os.system('git config -l') + + # download content from remote + os.system('./git-lfs fetch') + + # replace local files (links) with their real content + os.system('./git-lfs checkout') From 119a42599790016927dd01abbd692ff8ee1a3d10 Mon Sep 17 00:00:00 2001 From: Stephen Herbener Date: Mon, 9 Nov 2020 17:56:13 -0700 Subject: [PATCH 06/10] debugging --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 064956f9..fbae379c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -195,9 +195,9 @@ os.system('./git-lfs install') # configure for lfs processes - os.system('git config filter.lfs.process = "./git-lfs filter-process"') - os.system('git config filter.lfs.smudge = "./git-lfs smudge -- %f"') - os.system('git config filter.lfs.clean = "./git-lfs clean -- %f"') + os.system('git config filter.lfs.process "./git-lfs filter-process"') + os.system('git config filter.lfs.smudge "./git-lfs smudge -- %f"') + os.system('git config filter.lfs.clean "./git-lfs clean -- %f"') os.system('git config -l') From 5f4d265d9fc09853489225c9459dc0a19a45f2a0 Mon Sep 17 00:00:00 2001 From: Stephen Herbener Date: Mon, 9 Nov 2020 18:08:52 -0700 Subject: [PATCH 07/10] debugging --- docs/conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index fbae379c..b480d0b6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -191,8 +191,12 @@ osCmd = "tar xvzf " + tarFile os.system(osCmd) + # record the current working directory + cwd = os.getcwd() + # make lfs available in current repository - os.system('./git-lfs install') + osCmd = cwd + "/git-lfs install" + os.system(osCmd) # configure for lfs processes os.system('git config filter.lfs.process "./git-lfs filter-process"') From 93809c97aa0f331e1c90241bc9d69cdb418e3965 Mon Sep 17 00:00:00 2001 From: Stephen Herbener Date: Mon, 9 Nov 2020 18:12:50 -0700 Subject: [PATCH 08/10] debugging --- docs/conf.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b480d0b6..b2d119be 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -199,9 +199,12 @@ os.system(osCmd) # configure for lfs processes - os.system('git config filter.lfs.process "./git-lfs filter-process"') - os.system('git config filter.lfs.smudge "./git-lfs smudge -- %f"') - os.system('git config filter.lfs.clean "./git-lfs clean -- %f"') + osCmd = "git config filter.lfs.process '" + cwd + "/git-lfs filter-process'" + os.system(osCmd) + osCmd = "git config filter.lfs.smudge '" + cwd + "/git-lfs sumdge -- %f'" + os.system(osCmd) + osCmd = "git config filter.lfs.clean '" + cwd + "/git-lfs clean -- %f'" + os.system(osCmd) os.system('git config -l') From 96812f91dd3b19a79d244ac193c12a679969892e Mon Sep 17 00:00:00 2001 From: Stephen Herbener Date: Mon, 9 Nov 2020 18:15:44 -0700 Subject: [PATCH 09/10] debugging --- docs/conf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b2d119be..d16f6770 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -206,11 +206,14 @@ osCmd = "git config filter.lfs.clean '" + cwd + "/git-lfs clean -- %f'" os.system(osCmd) + # dump out configuration, including git lsf configuration os.system('git config -l') # download content from remote - os.system('./git-lfs fetch') + osCmd = cwd + "/git-lfs fetch" + os.system(osCmd) # replace local files (links) with their real content - os.system('./git-lfs checkout') + osCmd = cwd + "/git-lfs checkout" + os.system(osCmd) From 6149361cb22f2beba71b6a1ad4bc8bf652934f98 Mon Sep 17 00:00:00 2001 From: Stephen Herbener Date: Mon, 9 Nov 2020 18:18:20 -0700 Subject: [PATCH 10/10] debugging --- docs/conf.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d16f6770..0a60bcb5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -206,9 +206,6 @@ osCmd = "git config filter.lfs.clean '" + cwd + "/git-lfs clean -- %f'" os.system(osCmd) - # dump out configuration, including git lsf configuration - os.system('git config -l') - # download content from remote osCmd = cwd + "/git-lfs fetch" os.system(osCmd)