From df857e3b441fed6a174c49e18b57f500251b4940 Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 11 Oct 2024 13:40:30 +0100 Subject: [PATCH 1/7] Remove deprecated `strict` argument from `makedocs()` The `strict` kwarg was removed from Documenter.jl. Now all builds are 'strict' by default. --- docs/make.jl | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index c5c25b0d7..ad13266b3 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -9,19 +9,10 @@ Pkg.instantiate() using Documenter using moment_kinetics, makie_post_processing, plots_post_processing -if get(ENV, "CI", nothing) == "true" - # On the CI, run in strict mode to turn warnings into errors, so that we don't deploy - # documentation with formatting bugs. - strict = true -else - strict = false -end - makedocs( sitename = "moment_kinetics", format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"), modules = [moment_kinetics, makie_post_processing, plots_post_processing], - strict = strict, ) if get(ENV, "CI", nothing) == "true" From ecf7e1d2f12f6594b6c3efc1875c740c28276273 Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 11 Oct 2024 14:17:26 +0100 Subject: [PATCH 2/7] Use new [sources] in Project.toml to simplify docs setup --- docs/Project.toml | 8 ++++---- docs/make.jl | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index 0527c1548..6a6ca7102 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,10 +1,10 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" -Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" makie_post_processing = "4dd1b173-c370-4c56-9cc2-d797e41ae9f0" moment_kinetics = "b5ff72cc-06fc-4161-ad14-dba1c22ed34e" plots_post_processing = "c3e9b6e6-652c-46aa-9ac0-1bc582aad122" -[compat] -Documenter = "0.27" +[sources] +makie_post_processing = {path = "../makie_post_processing/makie_post_processing"} +moment_kinetics = {path = "../moment_kinetics/"} +plots_post_processing = {path = "../plots_post_processing/plots_post_processing"} diff --git a/docs/make.jl b/docs/make.jl index ad13266b3..be13e771f 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,9 +1,5 @@ using Pkg -repo_dir = dirname(dirname(@__FILE__)) -Pkg.develop([PackageSpec(path=joinpath(repo_dir, "moment_kinetics")), - PackageSpec(path=joinpath(repo_dir, "makie_post_processing", "makie_post_processing")), - PackageSpec(path=joinpath(repo_dir, "plots_post_processing", "plots_post_processing"))]) Pkg.instantiate() using Documenter From 947696d0b99a40a16145ce121b87d8d0eb53cb76 Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 11 Oct 2024 14:24:08 +0100 Subject: [PATCH 3/7] Use julia-1.11 for CI tests --- .github/workflows/debug_checks.yml | 2 +- .github/workflows/documentation.yml | 4 ++-- .github/workflows/examples.yml | 2 +- .github/workflows/longtest.yml | 2 +- .github/workflows/parallel_test.yml | 4 ++-- .github/workflows/test.yml | 2 +- .github/workflows/test_scripts.yml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/debug_checks.yml b/.github/workflows/debug_checks.yml index 087407d9b..9dc6d0bcf 100644 --- a/.github/workflows/debug_checks.yml +++ b/.github/workflows/debug_checks.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: '1.10' + version: '1.11' arch: x64 - uses: julia-actions/cache@v2 - name: Debug test diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 4b68899e9..ba654c1c3 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: '1.10' + version: '1.11' - uses: julia-actions/cache@v2 - name: Install dependencies run: | @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: '1.10' + version: '1.11' - name: Install dependencies run: | # Version 3.9.0 of matplotlib causes an error with PyPlot.jl, so pin diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index e38a824e9..7c368925d 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: '1.10' + version: '1.11' - uses: julia-actions/cache@v2 - name: Test examples run: | diff --git a/.github/workflows/longtest.yml b/.github/workflows/longtest.yml index 8d4990bb6..62542e719 100644 --- a/.github/workflows/longtest.yml +++ b/.github/workflows/longtest.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: '1.10' + version: '1.11' - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 with: diff --git a/.github/workflows/parallel_test.yml b/.github/workflows/parallel_test.yml index 5441dcc82..6e33239e1 100644 --- a/.github/workflows/parallel_test.yml +++ b/.github/workflows/parallel_test.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: '1.10' + version: '1.11' arch: x64 - uses: julia-actions/cache@v2 - run: | @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: '1.10' + version: '1.11' - uses: julia-actions/cache@v2 - run: | touch Project.toml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb5948b5f..b61bc479d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: '1.10' + version: '1.11' - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 with: diff --git a/.github/workflows/test_scripts.yml b/.github/workflows/test_scripts.yml index 98eede2b0..a04e52831 100644 --- a/.github/workflows/test_scripts.yml +++ b/.github/workflows/test_scripts.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: - version: '1.10' + version: '1.11' - uses: julia-actions/cache@v2 - name: Test test_scripts run: | From cf4fa8baec0d0b80928e237e485c5f5f9837238a Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 11 Oct 2024 17:12:21 +0100 Subject: [PATCH 4/7] Set `size_threshold` to avoid errors from makedocs() --- docs/make.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index be13e771f..52e27ca78 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -7,7 +7,10 @@ using moment_kinetics, makie_post_processing, plots_post_processing makedocs( sitename = "moment_kinetics", - format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"), + format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true", + size_threshold = 1000000, + size_threshold_warn = 500000, + ), modules = [moment_kinetics, makie_post_processing, plots_post_processing], ) From 31c7ec702c47cd871bdc527769f39b0b573f0bec Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 11 Oct 2024 17:21:52 +0100 Subject: [PATCH 5/7] Get moment_kinetics version number for online docs --- docs/make.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index 52e27ca78..e0cc72d51 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -2,7 +2,7 @@ using Pkg Pkg.instantiate() -using Documenter +using Documenter, UUIDs using moment_kinetics, makie_post_processing, plots_post_processing makedocs( @@ -10,6 +10,13 @@ makedocs( format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true", size_threshold = 1000000, size_threshold_warn = 500000, + # Use the following horrible incantation to get the version + # of moment_kinetics. moment_kinetics is the package with the + # UUID being used here. We need to do this because the + # Project.toml in the top-level directory is user-generated + # and does not have a version, but this is the Project.toml + # that would be used by default by Documenter.jl. + inventory_version = Pkg.dependencies()[UUID("b5ff72cc-06fc-4161-ad14-dba1c22ed34e")].version, ), modules = [moment_kinetics, makie_post_processing, plots_post_processing], ) From 2037821ad6b0eb1d893aaf3f9bb1e70af2fa0aba Mon Sep 17 00:00:00 2001 From: John Omotani Date: Thu, 12 Dec 2024 14:08:02 +0000 Subject: [PATCH 6/7] Add Glob as a dependency for docs Needed to build pdf docs. --- docs/Project.toml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index 6a6ca7102..dd87d2e63 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,10 +1,15 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" makie_post_processing = "4dd1b173-c370-4c56-9cc2-d797e41ae9f0" moment_kinetics = "b5ff72cc-06fc-4161-ad14-dba1c22ed34e" plots_post_processing = "c3e9b6e6-652c-46aa-9ac0-1bc582aad122" -[sources] -makie_post_processing = {path = "../makie_post_processing/makie_post_processing"} -moment_kinetics = {path = "../moment_kinetics/"} -plots_post_processing = {path = "../plots_post_processing/plots_post_processing"} +[sources.makie_post_processing] +path = "../makie_post_processing/makie_post_processing" + +[sources.moment_kinetics] +path = "../moment_kinetics/" + +[sources.plots_post_processing] +path = "../plots_post_processing/plots_post_processing" From da23fb9b12037be04e2ebc94290fecaa4d525f7f Mon Sep 17 00:00:00 2001 From: John Omotani Date: Thu, 12 Dec 2024 16:54:49 +0000 Subject: [PATCH 7/7] Bump tolerance in calculus tests Apparently rounding errors have changed in Julia-1.11, so the tolerance for one of the calculus tests needs to be relaxed slightly. --- moment_kinetics/test/calculus_tests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moment_kinetics/test/calculus_tests.jl b/moment_kinetics/test/calculus_tests.jl index 23a77e71a..9e9acc98e 100644 --- a/moment_kinetics/test/calculus_tests.jl +++ b/moment_kinetics/test/calculus_tests.jl @@ -701,7 +701,7 @@ function runtests() # something like p*(round-off) for x^p (?) so error on expected_df would # be p*p*(round-off), or plausibly 1024*(round-off), so tolerance of # 2e-11 isn't unreasonable. - @test isapprox(df, expected_df, rtol=2.0e-11, atol=6.0e-12, + @test isapprox(df, expected_df, rtol=3.0e-11, atol=6.0e-12, norm=maxabs_norm) end end