From 9049909a82950a4b08cd86296863e9a81bd1cc22 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 16 Jan 2024 15:10:52 -0500 Subject: [PATCH 01/22] adding buildkite functionality and an initialize script to automate some template set-up --- .buildkite/pipeline.yml | 20 ++++++++++++++++ init.sh | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .buildkite/pipeline.yml create mode 100644 init.sh diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 0000000..ef94869 --- /dev/null +++ b/.buildkite/pipeline.yml @@ -0,0 +1,20 @@ +env: + JULIA_VERSION: "1.9.3" + +steps: + + - label: ":hammer: Build Project" + command: + - "module load julia" + - "julia --project=docs --color=yes -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.precompile()'" + + - wait + + - label: ":scroll: Build docs and run tests" + command: + - "srun --mem=8G --time=1:00:00 --unbuffered jobscript.sh" + env: + JULIA_PROJECT: "docs/" + + - wait + diff --git a/init.sh b/init.sh new file mode 100644 index 0000000..9f16072 --- /dev/null +++ b/init.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +DEFAULT_REPO='AlgebraicX.jl' +DEFAULT_UUID='b66562e1-fa90-4e8b-9505-c909188fab76' + +usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. + +Example: ./init.sh '$DEFAULT_REPO' '$DEFAULT_UUID'" + +REPO=$1 +UUID=${2:-$(uuidgen)} + +# set to lowercase +UUID=${UUID,,} + +if [ ! $REPO ] || [ ! $UUID ]; then + echo "" + echo $usage$ >&2; exit 1 +fi + +read -p "By continuing, the following substitutions will be made: + +REPO: $DEFAULT_REPO => $REPO +UUID: $DEFAULT_UUID => $UUID + +Are you sure?" -n 1 -r +echo + +if [[ ! $REPLY =~ ^[Yy]$ ]] +then + [[ "$0" = "BASH_SOURCE" ]] && exit 1 || return 1 +fi + +# rename +mv src/$DEFAULT_REPO.jl src/$REPO.jl + +# get version +unameOut="$(uname -s)" + +case "${unameOut}" in + Linux*) + git grep -l $DEFAULT_REPO | xargs sed -i 's/{$REPO}/{$REPO}/g'; + git grep -l $DEFAULT_UUID | xargs sed -i 's/{$UUID}/{$UUID}/g';; + Darwin*) + git grep -l $DEFAULT_REPO | xargs sed -i '' -e 's/{$REPO}/{$REPO}/g'; + git grep -l $DEFAULT_UUID | xargs sed -i '' -e 's/{$UUID}/{$UUID}/g';; + *) + echo UNKNOWN:${unameOut};; +esac + +git commit -am "Initialized $REPO" +git push From bf322be71c69b5e750781a9448de1f80d1a040d2 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 16 Jan 2024 15:25:10 -0500 Subject: [PATCH 02/22] fixed init.sh --- init.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/init.sh b/init.sh index 9f16072..557f224 100644 --- a/init.sh +++ b/init.sh @@ -1,6 +1,6 @@ #!/bin/bash -DEFAULT_REPO='AlgebraicX.jl' +DEFAULT_REPO='AlgebraicX' DEFAULT_UUID='b66562e1-fa90-4e8b-9505-c909188fab76' usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. @@ -32,21 +32,26 @@ then fi # rename -mv src/$DEFAULT_REPO.jl src/$REPO.jl +if [[ $REPO == *.jl ]] +then + mv src/$DEFAULT_REPO.jl src/$REPO +else + mv src/$DEFAULT_REPO.jl src/$REPO.jl +fi # get version unameOut="$(uname -s)" case "${unameOut}" in Linux*) - git grep -l $DEFAULT_REPO | xargs sed -i 's/{$REPO}/{$REPO}/g'; - git grep -l $DEFAULT_UUID | xargs sed -i 's/{$UUID}/{$UUID}/g';; + git grep -l $DEFAULT_REPO | xargs sed -i 's/{$DEFAULT_REPO}/{$REPO}/g'; + git grep -l $DEFAULT_UUID | xargs sed -i 's/{$DEFAULT_UUID}/{$UUID}/g';; Darwin*) - git grep -l $DEFAULT_REPO | xargs sed -i '' -e 's/{$REPO}/{$REPO}/g'; - git grep -l $DEFAULT_UUID | xargs sed -i '' -e 's/{$UUID}/{$UUID}/g';; + git grep -l $DEFAULT_REPO | xargs sed -i '' -e 's/{$DEFAULT_REPO}/{$REPO}/g'; + git grep -l $DEFAULT_UUID | xargs sed -i '' -e 's/{$DEFAULT_UUID}/{$UUID}/g';; *) echo UNKNOWN:${unameOut};; esac -git commit -am "Initialized $REPO" -git push +# git commit -am "Initialized $REPO" +# git push From 47eca769f93e83f114b43958b7769388fc5d3461 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 16 Jan 2024 15:28:30 -0500 Subject: [PATCH 03/22] fixed init.sh --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 557f224..e08602c 100644 --- a/init.sh +++ b/init.sh @@ -1,6 +1,6 @@ #!/bin/bash -DEFAULT_REPO='AlgebraicX' +DEFAULT_REPO='AlgebraicTemplate' DEFAULT_UUID='b66562e1-fa90-4e8b-9505-c909188fab76' usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. From 8f5f09931f57f7b2e775e4653609ae60995de938 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 16 Jan 2024 15:31:55 -0500 Subject: [PATCH 04/22] fixed init.sh --- init.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init.sh b/init.sh index e08602c..ac0d3f2 100644 --- a/init.sh +++ b/init.sh @@ -44,11 +44,11 @@ unameOut="$(uname -s)" case "${unameOut}" in Linux*) - git grep -l $DEFAULT_REPO | xargs sed -i 's/{$DEFAULT_REPO}/{$REPO}/g'; - git grep -l $DEFAULT_UUID | xargs sed -i 's/{$DEFAULT_UUID}/{$UUID}/g';; + git grep -l $DEFAULT_REPO | xargs sed -i "s/{$DEFAULT_REPO}/{$REPO}/g"; + git grep -l $DEFAULT_UUID | xargs sed -i "s/{$DEFAULT_UUID}/{$UUID}/g";; Darwin*) - git grep -l $DEFAULT_REPO | xargs sed -i '' -e 's/{$DEFAULT_REPO}/{$REPO}/g'; - git grep -l $DEFAULT_UUID | xargs sed -i '' -e 's/{$DEFAULT_UUID}/{$UUID}/g';; + git grep -l $DEFAULT_REPO | xargs sed -i '' -e "s/{$DEFAULT_REPO}/{$REPO}/g"; + git grep -l $DEFAULT_UUID | xargs sed -i '' -e "s/{$DEFAULT_UUID}/{$UUID}/g";; *) echo UNKNOWN:${unameOut};; esac From 65c9375d5dbc9a452d69834f3e876197d17fb7c1 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 16 Jan 2024 15:39:07 -0500 Subject: [PATCH 05/22] fixed init.sh --- init.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init.sh b/init.sh index ac0d3f2..c1a6525 100644 --- a/init.sh +++ b/init.sh @@ -44,11 +44,11 @@ unameOut="$(uname -s)" case "${unameOut}" in Linux*) - git grep -l $DEFAULT_REPO | xargs sed -i "s/{$DEFAULT_REPO}/{$REPO}/g"; - git grep -l $DEFAULT_UUID | xargs sed -i "s/{$DEFAULT_UUID}/{$UUID}/g";; + git grep -l $DEFAULT_REPO | xargs sed -i "s/${DEFAULT_REPO}/${REPO}/g"; + git grep -l $DEFAULT_UUID | xargs sed -i "s/${DEFAULT_UUID}/${$UUID}/g";; Darwin*) - git grep -l $DEFAULT_REPO | xargs sed -i '' -e "s/{$DEFAULT_REPO}/{$REPO}/g"; - git grep -l $DEFAULT_UUID | xargs sed -i '' -e "s/{$DEFAULT_UUID}/{$UUID}/g";; + git grep -l $DEFAULT_REPO | xargs sed -i '' -e "s/${DEFAULT_REPO}/${REPO}/g"; + git grep -l $DEFAULT_UUID | xargs sed -i '' -e "s/${DEFAULT_UUID}/${UUID}/g";; *) echo UNKNOWN:${unameOut};; esac From e34031289580769bd639e5289d7ee384c9318f00 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 16 Jan 2024 15:43:35 -0500 Subject: [PATCH 06/22] fixed init.sh --- init.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/init.sh b/init.sh index c1a6525..517d1c4 100644 --- a/init.sh +++ b/init.sh @@ -31,21 +31,13 @@ then [[ "$0" = "BASH_SOURCE" ]] && exit 1 || return 1 fi -# rename -if [[ $REPO == *.jl ]] -then - mv src/$DEFAULT_REPO.jl src/$REPO -else - mv src/$DEFAULT_REPO.jl src/$REPO.jl -fi - # get version unameOut="$(uname -s)" case "${unameOut}" in Linux*) git grep -l $DEFAULT_REPO | xargs sed -i "s/${DEFAULT_REPO}/${REPO}/g"; - git grep -l $DEFAULT_UUID | xargs sed -i "s/${DEFAULT_UUID}/${$UUID}/g";; + git grep -l $DEFAULT_UUID | xargs sed -i "s/${DEFAULT_UUID}/${UUID}/g";; Darwin*) git grep -l $DEFAULT_REPO | xargs sed -i '' -e "s/${DEFAULT_REPO}/${REPO}/g"; git grep -l $DEFAULT_UUID | xargs sed -i '' -e "s/${DEFAULT_UUID}/${UUID}/g";; @@ -53,5 +45,15 @@ case "${unameOut}" in echo UNKNOWN:${unameOut};; esac +# rename +if [[ $REPO == *.jl ]] +then + mv src/$DEFAULT_REPO.jl src/$REPO +else + mv src/$DEFAULT_REPO.jl src/$REPO.jl +fi + + + # git commit -am "Initialized $REPO" # git push From a99bb05817e4323fdc31f26af43a5f6ec5288a85 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 14:43:39 -0500 Subject: [PATCH 07/22] fixed init.sh --- init.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 517d1c4..9c39c5e 100644 --- a/init.sh +++ b/init.sh @@ -23,7 +23,7 @@ read -p "By continuing, the following substitutions will be made: REPO: $DEFAULT_REPO => $REPO UUID: $DEFAULT_UUID => $UUID -Are you sure?" -n 1 -r +Are you sure? y/N" -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]] @@ -31,6 +31,8 @@ then [[ "$0" = "BASH_SOURCE" ]] && exit 1 || return 1 fi +echo "Doing the thing..." + # get version unameOut="$(uname -s)" From 51303fcdee365ed5c59d3d20df7dc5f0514db182 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 14:50:10 -0500 Subject: [PATCH 08/22] fixed init --- init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.sh b/init.sh index 9c39c5e..ad4ef9a 100644 --- a/init.sh +++ b/init.sh @@ -23,12 +23,12 @@ read -p "By continuing, the following substitutions will be made: REPO: $DEFAULT_REPO => $REPO UUID: $DEFAULT_UUID => $UUID -Are you sure? y/N" -n 1 -r +Are you sure? Press Y to continue or any other character to exit." -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]] then - [[ "$0" = "BASH_SOURCE" ]] && exit 1 || return 1 + exit 1 fi echo "Doing the thing..." From c34f988143835c891ee01178382c09b70adc072f Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 14:57:13 -0500 Subject: [PATCH 09/22] fixed init.sh and updated README --- README.md | 28 ++-------------------------- init.sh | 4 ++-- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 506387e..18b7b76 100644 --- a/README.md +++ b/README.md @@ -27,32 +27,8 @@ A template repository for making a new AlgebraicJulia package. git clone https://github.com/AlgebraicJulia/AlgebraicX.jl.git cd AlgebraicX.jl ``` -5. Rename the file `src/AlgebraicTemplate.jl` to match the name of your new package (e.x. "AlgebraicX") - ```sh - mv src/AlgebraicTemplate.jl src/AlgebraicX.jl - ``` -6. Replace all instances of the word "AlgebraicTemplate" with your new package name (e.x. "AlgebraicX") - ```sh - # On linux - git grep -l 'AlgebraicTemplate' | xargs sed -i 's/AlgebraicTemplate/AlgebraicX/g' - # On Mac OS X - git grep -l 'AlgebraicTemplate' | xargs sed -i '' -e 's/AlgebraicTemplate/AlgebraicX/g' - ``` -7. Generate a new random version 4 UUID (you can get one here: https://www.uuidgenerator.net/version4) - - We will assume for this example that your new UUID is `` -8. Replace all instances of the template's UUID, "b66562e1-fa90-4e8b-9505-c909188fab76", with your new UUID (e.x. "") - ```sh - # On linux - git grep -l 'b66562e1-fa90-4e8b-9505-c909188fab76' | xargs sed -i 's/b66562e1-fa90-4e8b-9505-c909188fab76//g' - # On Mac OS X - git grep -l 'b66562e1-fa90-4e8b-9505-c909188fab76' | xargs sed -i '' -e 's/b66562e1-fa90-4e8b-9505-c909188fab76//g' - ``` -9. Commit these new changes to your repository - ```sh - git commit -am "Set up skeleton for AlgebraicX.jl" - git push - ``` -10. Go back to your repository and wait until the tests have passed, you can check the status by going to the "Actions" tab in the repository +5. Inspect for yourself and run `init.sh` with the new repository name and (optional) UUID are parameters. This script will substitute all instances of `AlgebraicX` with your new repository name and the default UUID with a new one or, if available, the UUID provided. +6. Go back to your repository and wait until the tests have passed, you can check the status by going to the "Actions" tab in the repository ### 📔 Set Up GitHub Pages (Public Repos Only) diff --git a/init.sh b/init.sh index ad4ef9a..5912a16 100644 --- a/init.sh +++ b/init.sh @@ -3,7 +3,7 @@ DEFAULT_REPO='AlgebraicTemplate' DEFAULT_UUID='b66562e1-fa90-4e8b-9505-c909188fab76' -usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. +usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be 'Test.' Example: ./init.sh '$DEFAULT_REPO' '$DEFAULT_UUID'" @@ -13,7 +13,7 @@ UUID=${2:-$(uuidgen)} # set to lowercase UUID=${UUID,,} -if [ ! $REPO ] || [ ! $UUID ]; then +if [ ! $REPO ] || [ $REPO == 'Test'] || [ ! $UUID ]; then echo "" echo $usage$ >&2; exit 1 fi From 81987fe9ccafd3907b7784dc2e53a717e4b1a540 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:02:07 -0500 Subject: [PATCH 10/22] fixed init --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 5912a16..cbe6e94 100644 --- a/init.sh +++ b/init.sh @@ -13,7 +13,7 @@ UUID=${2:-$(uuidgen)} # set to lowercase UUID=${UUID,,} -if [ ! $REPO ] || [ $REPO == 'Test'] || [ ! $UUID ]; then +if [ ! $REPO ] || [ "$REPO" = 'Test' ] || [ ! $UUID ]; then echo "" echo $usage$ >&2; exit 1 fi From a0ff11c6dff05e46c7fd6320cf81310b1fdc5086 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:03:31 -0500 Subject: [PATCH 11/22] fixed init --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index cbe6e94..8a09647 100644 --- a/init.sh +++ b/init.sh @@ -15,7 +15,7 @@ UUID=${UUID,,} if [ ! $REPO ] || [ "$REPO" = 'Test' ] || [ ! $UUID ]; then echo "" - echo $usage$ >&2; exit 1 + echo $usage >&2; exit 1 fi read -p "By continuing, the following substitutions will be made: From 41ed71a588de788fb34e066295c05a3f6ba1c265 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:04:35 -0500 Subject: [PATCH 12/22] fixed init --- init.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.sh b/init.sh index 8a09647..e509826 100644 --- a/init.sh +++ b/init.sh @@ -3,9 +3,10 @@ DEFAULT_REPO='AlgebraicTemplate' DEFAULT_UUID='b66562e1-fa90-4e8b-9505-c909188fab76' -usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be 'Test.' +usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be 'Test.'\n -Example: ./init.sh '$DEFAULT_REPO' '$DEFAULT_UUID'" +Example:\n +./init.sh '$DEFAULT_REPO' '$DEFAULT_UUID'" REPO=$1 UUID=${2:-$(uuidgen)} From 5347cbf9b4f116ed1be46419a26b1eb65ab628e5 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:06:01 -0500 Subject: [PATCH 13/22] fixed init --- init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.sh b/init.sh index e509826..f6a6f36 100644 --- a/init.sh +++ b/init.sh @@ -3,10 +3,10 @@ DEFAULT_REPO='AlgebraicTemplate' DEFAULT_UUID='b66562e1-fa90-4e8b-9505-c909188fab76' -usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be 'Test.'\n +usage='This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be "Test."\n Example:\n -./init.sh '$DEFAULT_REPO' '$DEFAULT_UUID'" +./init.sh "$DEFAULT_REPO" "$DEFAULT_UUID"' REPO=$1 UUID=${2:-$(uuidgen)} From fb4c0b92e40be88d421de6d54a7111962ed5b0ad Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:06:28 -0500 Subject: [PATCH 14/22] fixed init --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index f6a6f36..fe60182 100644 --- a/init.sh +++ b/init.sh @@ -6,7 +6,7 @@ DEFAULT_UUID='b66562e1-fa90-4e8b-9505-c909188fab76' usage='This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be "Test."\n Example:\n -./init.sh "$DEFAULT_REPO" "$DEFAULT_UUID"' +./init.sh "${DEFAULT_REPO}" "${DEFAULT_UUID}"' REPO=$1 UUID=${2:-$(uuidgen)} From 6651094668b1197b8fd1224eef46880b1656cde8 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:07:42 -0500 Subject: [PATCH 15/22] fixed init --- init.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.sh b/init.sh index fe60182..1323455 100644 --- a/init.sh +++ b/init.sh @@ -3,10 +3,10 @@ DEFAULT_REPO='AlgebraicTemplate' DEFAULT_UUID='b66562e1-fa90-4e8b-9505-c909188fab76' -usage='This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be "Test."\n +usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be 'Test.' -Example:\n -./init.sh "${DEFAULT_REPO}" "${DEFAULT_UUID}"' +Example: +./init.sh ${DEFAULT_REPO} ${DEFAULT_UUID}' REPO=$1 UUID=${2:-$(uuidgen)} From e1e7a84cc2f3a652c71944694e807e9459458168 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:08:30 -0500 Subject: [PATCH 16/22] fixed init --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 1323455..9149d0a 100644 --- a/init.sh +++ b/init.sh @@ -6,7 +6,7 @@ DEFAULT_UUID='b66562e1-fa90-4e8b-9505-c909188fab76' usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be 'Test.' Example: -./init.sh ${DEFAULT_REPO} ${DEFAULT_UUID}' +./init.sh ${DEFAULT_REPO} ${DEFAULT_UUID}" REPO=$1 UUID=${2:-$(uuidgen)} From 3743415c7f4293c6e30781be5651adfa2ba590e8 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:11:02 -0500 Subject: [PATCH 17/22] fixed init --- init.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init.sh b/init.sh index 9149d0a..809d2c5 100644 --- a/init.sh +++ b/init.sh @@ -3,9 +3,8 @@ DEFAULT_REPO='AlgebraicTemplate' DEFAULT_UUID='b66562e1-fa90-4e8b-9505-c909188fab76' -usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be 'Test.' - -Example: +usage="This script is for initializing the template with the new repository name and UUID. Please provide the new repository name and UUID in that order. The repository name cannot be 'Test.'\n +Example:\n ./init.sh ${DEFAULT_REPO} ${DEFAULT_UUID}" REPO=$1 @@ -16,7 +15,8 @@ UUID=${UUID,,} if [ ! $REPO ] || [ "$REPO" = 'Test' ] || [ ! $UUID ]; then echo "" - echo $usage >&2; exit 1 + printf "$usage" + exit 1 fi read -p "By continuing, the following substitutions will be made: From ca3884f694ebed873cf880a8fe33d8fa0c0aff79 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:12:16 -0500 Subject: [PATCH 18/22] fixed init --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 809d2c5..c64d999 100644 --- a/init.sh +++ b/init.sh @@ -15,7 +15,7 @@ UUID=${UUID,,} if [ ! $REPO ] || [ "$REPO" = 'Test' ] || [ ! $UUID ]; then echo "" - printf "$usage" + printf '<%s>' "$usage" exit 1 fi From 272ff7c972b80cacf514bc81f03576f61ecf4f3b Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:12:53 -0500 Subject: [PATCH 19/22] fixed init --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index c64d999..809d2c5 100644 --- a/init.sh +++ b/init.sh @@ -15,7 +15,7 @@ UUID=${UUID,,} if [ ! $REPO ] || [ "$REPO" = 'Test' ] || [ ! $UUID ]; then echo "" - printf '<%s>' "$usage" + printf "$usage" exit 1 fi From 5c7d4678e98a7b0de70d6b60ee7a94f01ea5867a Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:21:10 -0500 Subject: [PATCH 20/22] fixed init.sh --- init.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/init.sh b/init.sh index 809d2c5..dbe5a46 100644 --- a/init.sh +++ b/init.sh @@ -56,7 +56,13 @@ else mv src/$DEFAULT_REPO.jl src/$REPO.jl fi +read -p "Would you like this script to add, commit, and push the new changes?" -n 1 -r +echo +if [[ ! $REPLY =~ ^[Yy]$ ]] +then + exit 1 +fi -# git commit -am "Initialized $REPO" -# git push +git commit -am "Initialized $REPO" +git push From 0ae8b70bab543fffde295ac289d8e96b1493365e Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 17 Jan 2024 15:21:10 -0500 Subject: [PATCH 21/22] added init.sh, changed README, moved jobscript to buildkite --- .buildkite/jobscript.sh | 16 ++++++++++++++++ .buildkite/pipeline.yml | 2 +- README.md | 6 ++++++ init.sh | 4 ++-- 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100755 .buildkite/jobscript.sh diff --git a/.buildkite/jobscript.sh b/.buildkite/jobscript.sh new file mode 100755 index 0000000..f9a362c --- /dev/null +++ b/.buildkite/jobscript.sh @@ -0,0 +1,16 @@ +#!/bin/bash +#SBATCH --job-name=diagrammatic_equations_CI # Job name +#SBATCH --mail-type=END,FAIL # Mail events (NONE, BEGIN, END, FAIL, ALL) +#SBATCH --mail-user=cuffaro.m@ufl.edu # Where to send mail +#SBATCH --ntasks=1 # Run on a single CPU +#SBATCH --mem=8gb # Job memory request +#SBATCH --time=00:15:00 # Time limit hrs:min:sec +pwd; hostname; date + +module load julia + +echo "Running Tests..." +julia --project -t 16 -e 'using Pkg; Pkg.status(); Pkg.test()' + +echo "Building Documentation..." +julia --project=docs -t 16 -e'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.status(); Pkg.instantiate(); include("docs/make.jl")' diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ef94869..1568ae0 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -12,7 +12,7 @@ steps: - label: ":scroll: Build docs and run tests" command: - - "srun --mem=8G --time=1:00:00 --unbuffered jobscript.sh" + - "srun --mem=8G --time=1:00:00 --unbuffered .buildkite/jobscript.sh" env: JULIA_PROJECT: "docs/" diff --git a/README.md b/README.md index 18b7b76..2f0df12 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,12 @@ A template repository for making a new AlgebraicJulia package. 5. Inspect for yourself and run `init.sh` with the new repository name and (optional) UUID are parameters. This script will substitute all instances of `AlgebraicX` with your new repository name and the default UUID with a new one or, if available, the UUID provided. 6. Go back to your repository and wait until the tests have passed, you can check the status by going to the "Actions" tab in the repository +### Buildkite + +AlgebraicJulia uses [Buildkite](https://buildkite.com/) to submit resource-intensive processes such as building documentation and executing tests to the [HiPerGator](https://www.rc.ufl.edu/about/hipergator/) computing cluster. + +While this template comes with a preconfigured `.buildkite/pipeline.yml` file, this repository is not integrated with Buildkite by default. If you would like your repository to use Buildkite to run processes on HiPerGator, tag an issue with @AlgebraicJulia/SysAdmins. + ### 📔 Set Up GitHub Pages (Public Repos Only) 1. Follow the Usage steps above to set up a new template, make sure all initial GitHub Actions have passed diff --git a/init.sh b/init.sh index dbe5a46..1ff0cc5 100644 --- a/init.sh +++ b/init.sh @@ -24,7 +24,7 @@ read -p "By continuing, the following substitutions will be made: REPO: $DEFAULT_REPO => $REPO UUID: $DEFAULT_UUID => $UUID -Are you sure? Press Y to continue or any other character to exit." -n 1 -r +Are you sure? [y/N]" -n 1 -r -s echo if [[ ! $REPLY =~ ^[Yy]$ ]] @@ -56,7 +56,7 @@ else mv src/$DEFAULT_REPO.jl src/$REPO.jl fi -read -p "Would you like this script to add, commit, and push the new changes?" -n 1 -r +read -p "Would you like this script to add, commit, and push the new changes? [y/N]" -n 1 -r -s echo if [[ ! $REPLY =~ ^[Yy]$ ]] From 574fec16dcb09597fd29fe3ce86be986b8c65b60 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 2 Feb 2024 21:22:25 -0500 Subject: [PATCH 22/22] init.sh now gets current folder name --- .buildkite/jobscript.sh | 4 ++-- .buildkite/pipeline.yml | 2 +- init.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.buildkite/jobscript.sh b/.buildkite/jobscript.sh index f9a362c..c882629 100755 --- a/.buildkite/jobscript.sh +++ b/.buildkite/jobscript.sh @@ -10,7 +10,7 @@ pwd; hostname; date module load julia echo "Running Tests..." -julia --project -t 16 -e 'using Pkg; Pkg.status(); Pkg.test()' +julia --project -t 32 -e 'using Pkg; Pkg.status(); Pkg.test()' echo "Building Documentation..." -julia --project=docs -t 16 -e'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.status(); Pkg.instantiate(); include("docs/make.jl")' +julia --project=docs -t 32 -e'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.status(); Pkg.instantiate(); include("docs/make.jl")' diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 1568ae0..63e3ca3 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -12,7 +12,7 @@ steps: - label: ":scroll: Build docs and run tests" command: - - "srun --mem=8G --time=1:00:00 --unbuffered .buildkite/jobscript.sh" + - "srun --cpus-per-task=32 --mem=8G --time=1:00:00 --output=.buildkite/log_%j.log --unbuffered .buildkite/jobscript.sh" env: JULIA_PROJECT: "docs/" diff --git a/init.sh b/init.sh index 1ff0cc5..f16c75a 100644 --- a/init.sh +++ b/init.sh @@ -7,7 +7,7 @@ usage="This script is for initializing the template with the new repository name Example:\n ./init.sh ${DEFAULT_REPO} ${DEFAULT_UUID}" -REPO=$1 +REPO={$1:-$(echo "${PWD##*/}")} UUID=${2:-$(uuidgen)} # set to lowercase