diff --git a/.github/workflows/compat_helper.yml b/.github/workflows/compat_helper.yml new file mode 100644 index 0000000..73ffe78 --- /dev/null +++ b/.github/workflows/compat_helper.yml @@ -0,0 +1,22 @@ +name: CompatHelper +on: + schedule: + - cron: '37 3 * * *' + workflow_dispatch: +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="dev", pr_title_prefix="[ci skip] ")' 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..e6f5cfd 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,14 +24,22 @@ 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 - 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 df9cbb2..f2d5b4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,15 +3,30 @@ 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' + +permissions: + actions: write + contents: read + 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 @@ -32,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 diff --git a/Project.toml b/Project.toml index 5711386..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" @@ -13,3 +13,14 @@ 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] +ArgParse = "1" +ColorSchemes = "3" +IMASDD = "0.1" +Interpolations = "0.15" +NearestNeighbors = "0.4" +RecipesBase = "1" +StaticArrays = "1" +Statistics = "1" +julia = ">= 1.10" 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") +``` 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