From 92199c3297cfd32e4a6213fa42925d983f7a0185 Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Fri, 12 Jul 2024 15:51:30 -0700 Subject: [PATCH 1/8] Installing CompatHelper workflow Installing compat helper to keep compatibility bounded to the latest version of the dependencies. For now, the PRs are made to this branch to get the first version of the Project.toml file with compat entries. Once the compat entries are added, the PRs will be made to the dev branch where if the tests pass, they will be added and nerge with main branch will happen with version increment. --- .github/workflows/compat_helper.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/compat_helper.yml diff --git a/.github/workflows/compat_helper.yml b/.github/workflows/compat_helper.yml new file mode 100644 index 0000000..b5ef41a --- /dev/null +++ b/.github/workflows/compat_helper.yml @@ -0,0 +1,26 @@ +name: CompatHelper +on: + schedule: + - cron: '37 3 * * *' + workflow_dispatch: + push: + branches: + - compat + +jobs: + CompatHelper: + runs-on: ubuntu-latest + steps: + - name: "Add the FuseRegistry via Git" + run: | + using Pkg + Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git")) + Pkg.Registry.add("General") + shell: julia --color=yes {0} + - name: Pkg.add("CompatHelper") + run: julia -e 'using Pkg; Pkg.add("CompatHelper")' + - name: CompatHelper.main() + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} + run: julia -e 'using CompatHelper; CompatHelper.main(;master_branch="compat")' From 48fcd56bfa2a2d5ca3afbe6902003dabb558fb8b Mon Sep 17 00:00:00 2001 From: CompatHelper Julia Date: Fri, 12 Jul 2024 23:06:26 +0000 Subject: [PATCH 2/8] CompatHelper: add new compat entry for RecipesBase at version 1, (keep existing compat) --- Project.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Project.toml b/Project.toml index 5711386..92e57e1 100644 --- a/Project.toml +++ b/Project.toml @@ -13,3 +13,6 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] +RecipesBase = "1" From 4e3af25cd3d417e44470c95a27c2ae1c2bdc0a7c Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Fri, 12 Jul 2024 16:29:20 -0700 Subject: [PATCH 3/8] Added all compat helper PR entries and finalize All packages have been added in the [compat] section. Added julia with version >= 1.10. Changes the PR and push triggers to be for dev when Project.toml changes and added prefix [ci skip] to the commit message to avoid CI re-runs on the PR created by the compat helper. --- .github/workflows/compat_helper.yml | 12 +++++++++--- Project.toml | 8 ++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compat_helper.yml b/.github/workflows/compat_helper.yml index b5ef41a..932c4a6 100644 --- a/.github/workflows/compat_helper.yml +++ b/.github/workflows/compat_helper.yml @@ -3,10 +3,16 @@ on: schedule: - cron: '37 3 * * *' workflow_dispatch: + pull_request: + branches: + - dev + paths: + - 'Project.toml' push: branches: - - compat - + - dev + paths: + - 'Project.toml' jobs: CompatHelper: runs-on: ubuntu-latest @@ -23,4 +29,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} - run: julia -e 'using CompatHelper; CompatHelper.main(;master_branch="compat")' + run: julia -e 'using CompatHelper; CompatHelper.main(;master_branch="dev", pr_title_prefix="[ci skip] ")' diff --git a/Project.toml b/Project.toml index 92e57e1..bb5dc1a 100644 --- a/Project.toml +++ b/Project.toml @@ -15,4 +15,12 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] +ArgParse = "1" +ColorSchemes = "3" +IMASDD = "0.1" +Interpolations = "0.15" +NearestNeighbors = "0.4" RecipesBase = "1" +StaticArrays = "1" +Statistics = "1" +julia = ">= 1.10" From 77058e38b4f8057ac17789e8a3d4cf2c21a39a59 Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Fri, 12 Jul 2024 16:47:12 -0700 Subject: [PATCH 4/8] Updating other CIs with julia version, arch, paths --- .github/workflows/format_check.yml | 11 +++++++++-- .github/workflows/make_docs.yml | 15 ++++++++++++--- .github/workflows/test.yml | 14 ++++++++++++-- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/format_check.yml b/.github/workflows/format_check.yml index 4e46a44..31363c3 100644 --- a/.github/workflows/format_check.yml +++ b/.github/workflows/format_check.yml @@ -3,15 +3,21 @@ name: Format Check on: push: branches: ["master", "dev", "format"] + paths: + - '.github/workflows/format_check.yml' + - '**.jl' pull_request: branches: ["master", "dev"] + paths: + - '.github/workflows/format_check.yml' + - '**.jl' jobs: check: runs-on: ${{ matrix.os }} strategy: matrix: - julia-version: [1.9.3] - julia-arch: [x86] + julia-version: [1.x] + julia-arch: [x64] os: [ubuntu-latest] steps: - uses: julia-actions/setup-julia@latest @@ -23,6 +29,7 @@ jobs: run: | julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' julia -e 'using JuliaFormatter; format(".", verbose=true)' + - uses: julia-actions/cache@v1 - name: Format check run: | julia -e ' diff --git a/.github/workflows/make_docs.yml b/.github/workflows/make_docs.yml index e14ab77..d87d069 100644 --- a/.github/workflows/make_docs.yml +++ b/.github/workflows/make_docs.yml @@ -1,7 +1,11 @@ name: Make Docs on: pull_request: - branches: ["master"] + branches: ["master", "dev"] + paths: + - '.github/workflows/make_docs.yml' + - 'src/**' + - 'docs/**' push: branches: - master @@ -9,7 +13,7 @@ on: - docs paths: - '.github/workflows/make_docs.yml' - - 'src/' + - 'src/**' - 'docs/**' tags: '*' workflow_dispatch: @@ -20,7 +24,12 @@ jobs: contents: write statuses: write name: Documentation - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + julia-version: [1.x] + julia-arch: [x64] + os: [ubuntu-latest] steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df9cbb2..b35d69d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,15 +3,25 @@ name: Test on: push: branches: ["master", "dev", "autotest"] + paths: + - '.github/workflows/test.yml' + - 'src/**' + - 'test/**' + - 'Project.toml' pull_request: branches: ["master", "dev"] + paths: + - '.github/workflows/test.yml' + - 'src/**' + - 'test/**' + - 'Project.toml' jobs: test: runs-on: ${{ matrix.os }} strategy: matrix: - julia-version: [1.9.3] - julia-arch: [x86] + julia-version: [1.x] + julia-arch: [x64] os: [ubuntu-latest] steps: - uses: julia-actions/setup-julia@latest From 9d36cccf5170af48c0bb24281540b9dbcdecc188 Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Fri, 12 Jul 2024 17:02:26 -0700 Subject: [PATCH 5/8] Removing push and PR triggers to compat_helper It seems like a bad idea to set pusha dn PR triggers for CompatHelper because it by defualt clones latest master branch and just looks at that. --- .github/workflows/compat_helper.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/compat_helper.yml b/.github/workflows/compat_helper.yml index 932c4a6..73ffe78 100644 --- a/.github/workflows/compat_helper.yml +++ b/.github/workflows/compat_helper.yml @@ -3,16 +3,6 @@ on: schedule: - cron: '37 3 * * *' workflow_dispatch: - pull_request: - branches: - - dev - paths: - - 'Project.toml' - push: - branches: - - dev - paths: - - 'Project.toml' jobs: CompatHelper: runs-on: ubuntu-latest From ff08fcb35a830ceca63813c827d353536f3fcfef Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Fri, 12 Jul 2024 17:17:57 -0700 Subject: [PATCH 6/8] Use FuseRegistry for make_docs and test workflows --- .github/workflows/make_docs.yml | 5 ++++- .github/workflows/test.yml | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/make_docs.yml b/.github/workflows/make_docs.yml index d87d069..e6f5cfd 100644 --- a/.github/workflows/make_docs.yml +++ b/.github/workflows/make_docs.yml @@ -34,9 +34,12 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest - uses: julia-actions/cache@v1 + - name: "Add the FuseRegistry via Git" + run: | + julia --project=docs/ -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git")); Pkg.Registry.add("General")' - name: Install dependencies run: | - julia --project=docs/ -e 'using Pkg; Pkg.add(; url="https://github.com/ProjectTorreyPines/IMASDD.jl.git"); Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: Build and deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b35d69d..f2d5b4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,11 @@ on: - 'src/**' - 'test/**' - 'Project.toml' + +permissions: + actions: write + contents: read + jobs: test: runs-on: ${{ matrix.os }} @@ -42,9 +47,9 @@ jobs: run: | dvc pull - uses: julia-actions/cache@v1 - - name: Install dependencies + - name: "Add the FuseRegistry via Git" run: | - julia --project=. -e 'using Pkg; Pkg.rm(["IMASDD"]); Pkg.add(url="git@github.com:ProjectTorreyPines/IMASDD.jl.git", rev="master")' + julia --project=. -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git")); Pkg.Registry.add("General")' - uses: julia-actions/julia-runtest@v1 # Not set up yet # - uses: julia-actions/julia-processcoverage@v1 From bd3a5b017761b1f2e4a01c4365e9ed6ebdbc8ec8 Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Sat, 13 Jul 2024 00:16:44 -0700 Subject: [PATCH 7/8] Adding installation instructions, removed makefile Now GGDUtils has been added to FuseRegistry. There is no need for complicated makefile installation or custom url path installation anymore. --- docs/src/index.md | 31 +++++-------------------------- makefile | 27 --------------------------- 2 files changed, 5 insertions(+), 53 deletions(-) delete mode 100644 makefile diff --git a/docs/src/index.md b/docs/src/index.md index d9db9e2..82228fd 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -8,34 +8,13 @@ Depth = 5 ## Installation -### Using make: -After cloning this repo, check the make menu: -``` -GGDUtils.jl % make help -Help Menu +GGDUtils is registered with public repository [FuseRegistry](https://github.com/ProjectTorreyPines/FuseRegistry.jl/). For installation: -make env_with_cloned_repo (or make r): Creates a Julia environment with the cloned repositories -make env_with_git_url (or make u): Creates a Julia environment with the git urls without creating local clones -make clean: Deletes Project.toml and Manifest.toml for a fresh start ``` - -#### make r -This option creates local copies of required private repositories at the same level as current repository and uses them in develop mode to create a Manifest.toml - -#### make u -This option uses url of required private repositories to create a static Manifest.toml attached to current master branches of these repositories. - -#### make clean -Deletes Manifest.toml so that environment can be recreated, to update or change the last used method. - -### Using Julia REPL and installing using Github url - -Or, in julia REPL: -```julia -julia> using Pkg; -julia> Pkg.add(; url="https://github.com/ProjectTorreyPines/IMASDD.jl.git"); -julia> Pkg.add(; url="https://github.com/ProjectTorreyPines/GGDUtils.jl.git"); -julia> Pkg.instantiate() +using Pkg +Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git")) +Pkg.Registry.add("General") +Pkg.add("GGDUtils) ``` ## Interpolations diff --git a/makefile b/makefile deleted file mode 100644 index 1124392..0000000 --- a/makefile +++ /dev/null @@ -1,27 +0,0 @@ -SHELL := /bin/zsh -help: - @echo "Help Menu" - @echo - @echo "make env_with_cloned_repo (or make r): Creates a Julia environment with the cloned repositories" - @echo "make env_with_git_url (or make u): Creates a Julia environment with the git urls without creating local clones" - @echo "make clean: Deletes Project.toml and Manifest.toml for a fresh start" - @echo - -env_with_cloned_repo r: - @echo "Pulling sample files using dvc" - -dvc pull - @echo "Creating Julia environment by creating local clones of dependent repositories" - @echo "Cloning the repositories and generating Manifest.toml" - -git clone "git@github.com:ProjectTorreyPines/IMASDD.jl.git" ../IMASDD; \ - julia --project=. -e 'using Pkg; Pkg.rm(["IMASDD"]); Pkg.develop(path="../IMASDD"); Pkg.instantiate()' - -env_with_git_url u: - @echo "Pulling sample files using dvc" - -dvc pull - @echo "Creating Julia environment with the git urls without creating local clones" - @echo "Generating Project.toml and Manifest.toml" - julia --project=. -e 'using Pkg; Pkg.rm(["IMASDD"]); Pkg.add(url="git@github.com:ProjectTorreyPines/IMASDD.jl.git", rev="master"); Pkg.instantiate()' - -clean: - @echo "Deleting Manifest.toml" - -rm Manifest.toml From b8cd3271c2b95c2c00a7a5f6f76c5d4cc0c2b2b6 Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Sat, 13 Jul 2024 00:24:43 -0700 Subject: [PATCH 8/8] Releasing 1.0.1 with compat and registry install --- Project.toml | 2 +- README.md | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Project.toml b/Project.toml index bb5dc1a..6bdbc20 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GGDUtils" uuid = "b7b5e640-9b39-4803-84eb-376048795def" authors = ["Anchal Gupta "] -version = "1.0.0" +version = "1.0.1" [deps] ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" diff --git a/README.md b/README.md index b5e079b..6d1b6a9 100644 --- a/README.md +++ b/README.md @@ -6,23 +6,13 @@ Package holding utilities for Generalized Grid Description (GGD) objects in IMAS datastructure. Primary goals are interpolation and core profile extrapolation. For installation and usage instructions, see the [online documentation](https://projecttorreypines.github.io/GGDUtils.jl/stable). For documentation on under development branch, see [dev online documentation](https://projecttorreypines.github.io/GGDUtils.jl/dev) -## Building julia environment (installation) +## Installation -After cloning this repo, check the make menu: -``` -GGDUtils.jl % make help -Help Menu +GGDUtils is registered with public repository [FuseRegistry](https://github.com/ProjectTorreyPines/FuseRegistry.jl/). For installation: -make env_with_cloned_repo (or make r): Creates a Julia environment with the cloned repositories -make env_with_git_url (or make u): Creates a Julia environment with the git urls without creating local clones -make clean: Deletes Project.toml and Manifest.toml for a fresh start ``` - -### make r -This option creates local copies of required private repositories at the same level as current repository and uses them in develop mode to create a Manifest.toml - -### make u -This option uses url of required private repositories to create a static Manifest.toml attached to current master branches of these repositories. - -### make clean -Deletes Manifest.toml so that environment can be recreated, to update or change the last used method. +using Pkg +Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git")) +Pkg.Registry.add("General") +Pkg.add("GGDUtils") +```