From bc5daea47809c2ad9ee6be8375714d12463d9b13 Mon Sep 17 00:00:00 2001 From: icweaver Date: Sat, 25 Oct 2025 21:25:48 -0700 Subject: [PATCH 01/17] use workspaces --- Project.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Project.toml b/Project.toml index 9827c2afb5..49eb1ee043 100644 --- a/Project.toml +++ b/Project.toml @@ -7,3 +7,6 @@ TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" [compat] TypedTables = "1.4.6" julia = "1.6" + +[workspace] +projects = ["test", "docs"] From 7a0e004c025c3fb47723e5d4845925c81ee13b30 Mon Sep 17 00:00:00 2001 From: icweaver Date: Sat, 25 Oct 2025 21:33:50 -0700 Subject: [PATCH 02/17] remove JuliaAstro/Spectra.jl --- src/JuliaAstroDocs.jl | 10 ---------- test/runtests.jl | 6 +----- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/JuliaAstroDocs.jl b/src/JuliaAstroDocs.jl index fc9d1d6375..14f35dc3ac 100644 --- a/src/JuliaAstroDocs.jl +++ b/src/JuliaAstroDocs.jl @@ -366,16 +366,6 @@ ecosystem() = ( """, astropy = ["specreduce", "specutils"], ), - ( - name = "Spectra.jl", - repo = "https://github.com/JuliaAstro/Spectra.jl", - doc = "https://juliaastro.org/Spectra/stable", - tagline = "Utilities for interfacing with astronomical spectra and synthetic spectra libraries", - descr = """ - - Utilities for interfacing with astronomical spectra and synthetic spectra libraries - """, - astropy = ["specreduce", "specutils"], - ), ( name = "SpectralFitting.jl", repo = "https://github.com/fjebaker/SpectralFitting.jl", diff --git a/test/runtests.jl b/test/runtests.jl index 2f55cba92e..eabe45c0c3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -22,11 +22,7 @@ sort!(packages_juliaastro) for package in packages_juliaastro p_name = package.name @testset "$(p_name)" begin - if p_name == "Spectra.jl" - @test Pkg.add(url="https://github.com/JuliaAstro/Spectra.jl") == nothing - else - @test Pkg.add(chopsuffix(p_name, ".jl")) == nothing - end + @test Pkg.add(chopsuffix(p_name, ".jl")) == nothing end end end From 8fde755abaacdd588db2a1e75af4bf79d201d96c Mon Sep 17 00:00:00 2001 From: icweaver Date: Sat, 25 Oct 2025 21:38:14 -0700 Subject: [PATCH 03/17] not needed with workspaces --- docs/Project.toml | 1 - test/Project.toml | 3 --- 2 files changed, 4 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index a6fddfbbd4..347ea9d614 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -8,7 +8,6 @@ MultiDocumenter = "87ed4bf0-c935-4a67-83c3-2a03bee4197c" Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" [sources] -JuliaAstroDocs = {path = ".."} MultiDocumenter = {url = "https://github.com/JuliaComputing/MultiDocumenter.jl"} [compat] diff --git a/test/Project.toml b/test/Project.toml index f22fc7d1e1..df80553448 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -3,6 +3,3 @@ InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" JuliaAstroDocs = "5ba9df79-bc07-467f-bade-66a1d49082bd" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[sources] -JuliaAstroDocs = {path = ".."} From 390bf1553500435d52308bca7e113e60aff1b5e7 Mon Sep 17 00:00:00 2001 From: icweaver Date: Sat, 25 Oct 2025 22:44:06 -0700 Subject: [PATCH 04/17] add more test info --- test/runtests.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index eabe45c0c3..e5b7a5a003 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -45,9 +45,11 @@ sort!(packages_juliaastro) @testset "Package loading" begin for package in packages_juliaastro - @test eval(quote - @time_imports using $(Symbol(chopsuffix(package.name, ".jl"))) - end) == nothing + @testset "$(package.name)" begin + @test eval(quote + @time_imports using $(Symbol(chopsuffix(package.name, ".jl"))) + end) == nothing + end end end end From 39eba872ab56a990c5e3e0c45672e089a6872352 Mon Sep 17 00:00:00 2001 From: icweaver Date: Sun, 26 Oct 2025 01:32:17 -0700 Subject: [PATCH 05/17] use ParallelTestRunner.jl --- .github/workflows/CI.yml | 3 ++- Project.toml | 4 ++- test/Project.toml | 32 ++++++++++++++++++++++ test/development.jl | 23 ++++++++++++++++ test/release.jl | 24 +++++++++++++++++ test/runtests.jl | 58 +++++++++++----------------------------- 6 files changed, 100 insertions(+), 44 deletions(-) create mode 100644 test/development.jl create mode 100644 test/release.jl diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5824fb1d11..eb1afb56ac 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,4 +30,5 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 with: - coverage: false + test_args: '--verbose' + coverage: false diff --git a/Project.toml b/Project.toml index 49eb1ee043..991ab7a26f 100644 --- a/Project.toml +++ b/Project.toml @@ -2,11 +2,13 @@ name = "JuliaAstroDocs" uuid = "5ba9df79-bc07-467f-bade-66a1d49082bd" [deps] +ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc" TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" [compat] +ParallelTestRunner = "2.0.1" TypedTables = "1.4.6" -julia = "1.6" +julia = "1.10" [workspace] projects = ["test", "docs"] diff --git a/test/Project.toml b/test/Project.toml index df80553448..ee177efb27 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,5 +1,37 @@ [deps] +ASDF2 = "da470b1c-b0a8-4533-b4d1-e613846a4bd7" +AstroAngles = "5c4adb95-c1fc-4c53-b4ea-2a94080c53d2" +AstroImages = "fe3fc30c-9b16-11e9-1c73-17dabf39f4ad" +AstroLib = "c7932e45-9af1-51e7-9da9-f004cd3a462b" +AstroTime = "c61b5328-d09d-5e37-a9a8-0eb41c39009c" +Astroalign = "7f4629bd-323a-4fad-ad42-4ee56350f27f" +BoxLeastSquares = "6c353534-c22b-44cc-9076-7b904de9fadc" +CALCEPH = "1537fe66-4725-5aba-80f4-3a74792cecc1" +CCDReduction = "b790e538-3052-4cb9-9f1f-e05859a455f5" +CFITSIO = "3b1b4be9-1499-4b22-8d78-7db3344d1961" +Cosmology = "76746363-e552-5dba-9a5a-cef6fa9cc5ab" +DustExtinction = "fb44c06c-c62f-5397-83f5-69249e0a3c8e" +ERFA = "17511681-8477-586a-8d98-4cfd5a1f2ec3" +EarthOrientation = "732a3c5d-d6c0-58bc-adb1-1b51709a25e2" +EphemerisSources = "858900df-f7ae-402a-aa8c-3e4ef85aa271" +FITSIO = "525bcba6-941b-5504-bd06-fd0dc1a4d2eb" +GeneralAstrodynamics = "8068df5b-8501-4530-bd82-d24d3c9619db" +Healpix = "9f4e344d-96bc-545a-84a3-ae6b9e1b672b" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" JuliaAstroDocs = "5ba9df79-bc07-467f-bade-66a1d49082bd" +LACosmic = "a188e134-b1c0-4a25-bc7e-93a99f0f0e06" +LombScargle = "fc60dff9-86e7-5f2f-a8a0-edeadbb75bd9" +Orbits = "88f3d70c-3a4c-11ed-1389-4902f2e49de8" +PSFModels = "9ba017d1-7760-46cd-84a3-1e79e9ae9ddc" +ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc" +Photometry = "af68cb61-81ac-52ed-8703-edc140936be4" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +Reproject = "d1dcc2e6-806e-11e9-2897-3f99785db2ae" +SAOImageDS9 = "dbce9b26-8eb4-4825-964b-d4940cf8daff" +SPICE = "5bab7191-041a-5c2e-a744-024b9c3a5062" +SkyCoords = "fc659fc5-75a3-5475-a2ea-3da92c065361" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +Transits = "2e59a628-7bac-4d38-8059-3a73ba0928ab" +UnitfulAstro = "6112ee07-acf9-5e0f-b108-d242c714bf9f" +WCS = "15f3aee2-9e10-537f-b834-a6fb8bdb944d" +XPA = "d310a076-6a08-52b6-ab78-79baa254182b" diff --git a/test/development.jl b/test/development.jl new file mode 100644 index 0000000000..1d030e4dcc --- /dev/null +++ b/test/development.jl @@ -0,0 +1,23 @@ +@testset "Development versions are compatible" begin + ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0 + + for package in packages_juliaastro + @testset "$(package.name)" begin + @test Pkg.add(url=package.repo) == nothing + end + end + + @testset "Precompilation" begin + @test Pkg.precompile(; strict=true) == nothing + end + + @testset "Package loading" begin + for package in packages_juliaastro + @testset "$(package.name)" begin + @test eval(quote + @time_imports using $(Symbol(chopsuffix(package.name, ".jl"))) + end) == nothing + end + end + end +end diff --git a/test/release.jl b/test/release.jl new file mode 100644 index 0000000000..5dccee486d --- /dev/null +++ b/test/release.jl @@ -0,0 +1,24 @@ +@testset "Latest release versions are compatible" begin + for package in packages_juliaastro + p_name = package.name + # TODO: Include in testing when next release after v0.11.0 + p_name == "GeneralAstroDynamics" && continue + @testset "$(p_name)" begin + @test Pkg.add(chopsuffix(p_name, ".jl")) == nothing + end + end + + @testset "Precompilation" begin + @test Pkg.precompile(; strict=true) == nothing + end + + @testset "Package loading" begin + for package in packages_juliaastro + @testset "$(package.name)" begin + @test eval(quote + @time_imports using $(Symbol(chopsuffix(package.name, ".jl"))) + end) == nothing + end + end + end +end diff --git a/test/runtests.jl b/test/runtests.jl index e5b7a5a003..b57dd8e8ed 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,52 +4,26 @@ This file defines integration tests for the JuliaAstro package ecosystem. These are tests that confirm various packages can be installed and work together. =# -using Test, Pkg, InteractiveUtils - +using ParallelTestRunner: runtests, find_tests, parse_args import JuliaAstroDocs -ecosystem_t = JuliaAstroDocs.ecosystem_t() - -packages_juliaastro = filter(ecosystem_t) do package - occursin("juliaastro", lowercase(package.repo)) -end -unique!(p -> p.name, packages_juliaastro) -sort!(packages_juliaastro) - -@testset "JuliaAstro Package Evalauation" begin - @testset "Compatible versions exist" begin - ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0 - for package in packages_juliaastro - p_name = package.name - @testset "$(p_name)" begin - @test Pkg.add(chopsuffix(p_name, ".jl")) == nothing - end - end - end +const init_code = quote + # Start by testing that we can install all packages + # Worry if they compile successfully after + ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0 - @testset "Development versions compatible" begin - # Start by testing that we can install all packages - # Worry if they compile successfully after - ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0 + import Pkg + using JuliaAstroDocs: ecosystem_t + using InteractiveUtils: @time_imports - for package in packages_juliaastro - @testset "$(package.name)" begin - @test Pkg.add(url=package.repo) == nothing - end - end + packages_juliaastro = filter(ecosystem_t()) do package + occursin("juliaastro", lowercase(package.repo)) end + unique!(p -> p.name, packages_juliaastro) + sort!(packages_juliaastro) +end - @testset "Precompilation" begin - @test Pkg.precompile(; strict=true) == nothing - end +args = parse_args(Base.ARGS) +testsuite = find_tests(@__DIR__) - @testset "Package loading" begin - for package in packages_juliaastro - @testset "$(package.name)" begin - @test eval(quote - @time_imports using $(Symbol(chopsuffix(package.name, ".jl"))) - end) == nothing - end - end - end -end +runtests(JuliaAstroDocs, args; testsuite, init_code) From 6dd6343fcc19aaedbdee5933705d61d3b138609c Mon Sep 17 00:00:00 2001 From: icweaver Date: Sun, 26 Oct 2025 01:53:25 -0700 Subject: [PATCH 06/17] split out release and dev tests --- .github/workflows/{CI.yml => CI_dev.yml} | 4 +-- .github/workflows/CI_release.yml | 34 ++++++++++++++++++++++++ README.md | 3 ++- test/{development.jl => dev.jl} | 0 4 files changed, 38 insertions(+), 3 deletions(-) rename .github/workflows/{CI.yml => CI_dev.yml} (93%) create mode 100644 .github/workflows/CI_release.yml rename test/{development.jl => dev.jl} (100%) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI_dev.yml similarity index 93% rename from .github/workflows/CI.yml rename to .github/workflows/CI_dev.yml index eb1afb56ac..b5611e8896 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI_dev.yml @@ -1,4 +1,4 @@ -name: Test JuliaAstro +name: Test JuliaAstro (dev) on: push: @@ -30,5 +30,5 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 with: - test_args: '--verbose' + test_args: '--verbose dev' coverage: false diff --git a/.github/workflows/CI_release.yml b/.github/workflows/CI_release.yml new file mode 100644 index 0000000000..0b13c35ab8 --- /dev/null +++ b/.github/workflows/CI_release.yml @@ -0,0 +1,34 @@ +name: Test JuliaAstro (release) + +on: + push: + branches: [main] + pull_request: + schedule: + - cron: '15 2 * * *' # 2:15 AM UTC every day +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - "1" # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. + - "pre" + os: + - ubuntu-latest + arch: + - default + steps: + - uses: actions/checkout@v5 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + with: + test_args: '--verbose release' + coverage: false diff --git a/README.md b/README.md index f482920113..3f960479d4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ JuliaAstro.github.io [![docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaastro.org/) [![Build](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/Documentation.yml/badge.svg)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/Documentation.yml) [![Deploy](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/pages/pages-build-deployment/badge.svg?branch=gh-pages)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/pages/pages-build-deployment) -[![Test JuliaAstro](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/CI.yml/badge.svg)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/CI.yml) +[![Test JuliaAstro (release)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/CI_release.yml/badge.svg)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/CI_release.yml) +[![Test JuliaAstro (dev)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/CI_dev.yml/badge.svg)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/CI_dev.yml) ## Description diff --git a/test/development.jl b/test/dev.jl similarity index 100% rename from test/development.jl rename to test/dev.jl From 9f9b70e6df5e65a89fba82014628f7f5fe5ba62f Mon Sep 17 00:00:00 2001 From: icweaver Date: Mon, 27 Oct 2025 15:07:59 -0700 Subject: [PATCH 07/17] put back Spectra.jl [skip ci] --- src/JuliaAstroDocs.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/JuliaAstroDocs.jl b/src/JuliaAstroDocs.jl index 14f35dc3ac..fc9d1d6375 100644 --- a/src/JuliaAstroDocs.jl +++ b/src/JuliaAstroDocs.jl @@ -366,6 +366,16 @@ ecosystem() = ( """, astropy = ["specreduce", "specutils"], ), + ( + name = "Spectra.jl", + repo = "https://github.com/JuliaAstro/Spectra.jl", + doc = "https://juliaastro.org/Spectra/stable", + tagline = "Utilities for interfacing with astronomical spectra and synthetic spectra libraries", + descr = """ + - Utilities for interfacing with astronomical spectra and synthetic spectra libraries + """, + astropy = ["specreduce", "specutils"], + ), ( name = "SpectralFitting.jl", repo = "https://github.com/fjebaker/SpectralFitting.jl", From 3c23556aa55120ef93d665b4de3edf2c3ff2aac2 Mon Sep 17 00:00:00 2001 From: icweaver Date: Mon, 27 Oct 2025 16:45:06 -0700 Subject: [PATCH 08/17] use reusable workflow --- .github/workflows/CI.yml | 35 ++++++++++++++++++++++++++++++++ .github/workflows/CI_dev.yml | 29 ++++---------------------- .github/workflows/CI_release.yml | 29 ++++---------------------- 3 files changed, 43 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000000..a3300e93a0 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,35 @@ +name: CI + +on: + workflow_call: + inputs: + test_args: + required: true + type: string + +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - "1" # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. + - "pre" + os: + - ubuntu-latest + arch: + - default + steps: + - uses: actions/checkout@v5 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + with: + test_args: ${{ inputs.test_args }} + coverage: false diff --git a/.github/workflows/CI_dev.yml b/.github/workflows/CI_dev.yml index b5611e8896..bbb5a5f327 100644 --- a/.github/workflows/CI_dev.yml +++ b/.github/workflows/CI_dev.yml @@ -6,29 +6,8 @@ on: pull_request: schedule: - cron: '15 2 * * *' # 2:15 AM UTC every day + jobs: - test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - version: - - "1" # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. - - "pre" - os: - - ubuntu-latest - arch: - - default - steps: - - uses: actions/checkout@v5 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v2 - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 - with: - test_args: '--verbose dev' - coverage: false + uses: ./github/workflows/CI.yml + with: + test_args: "--verbose release" diff --git a/.github/workflows/CI_release.yml b/.github/workflows/CI_release.yml index 0b13c35ab8..c6699712be 100644 --- a/.github/workflows/CI_release.yml +++ b/.github/workflows/CI_release.yml @@ -6,29 +6,8 @@ on: pull_request: schedule: - cron: '15 2 * * *' # 2:15 AM UTC every day + jobs: - test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - version: - - "1" # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. - - "pre" - os: - - ubuntu-latest - arch: - - default - steps: - - uses: actions/checkout@v5 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v2 - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 - with: - test_args: '--verbose release' - coverage: false + uses: ./github/workflows/CI.yml + with: + test_args: "--verbose release" From 0b0bb02c72b0245a24aa478b646881ac69d5bf61 Mon Sep 17 00:00:00 2001 From: icweaver Date: Mon, 27 Oct 2025 16:50:27 -0700 Subject: [PATCH 09/17] typo --- .github/workflows/CI_dev.yml | 2 +- .github/workflows/CI_release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI_dev.yml b/.github/workflows/CI_dev.yml index bbb5a5f327..efc8791000 100644 --- a/.github/workflows/CI_dev.yml +++ b/.github/workflows/CI_dev.yml @@ -8,6 +8,6 @@ on: - cron: '15 2 * * *' # 2:15 AM UTC every day jobs: - uses: ./github/workflows/CI.yml + uses: ./.github/workflows/CI.yml with: test_args: "--verbose release" diff --git a/.github/workflows/CI_release.yml b/.github/workflows/CI_release.yml index c6699712be..5ae7880bb7 100644 --- a/.github/workflows/CI_release.yml +++ b/.github/workflows/CI_release.yml @@ -8,6 +8,6 @@ on: - cron: '15 2 * * *' # 2:15 AM UTC every day jobs: - uses: ./github/workflows/CI.yml + uses: ./.github/workflows/CI.yml with: test_args: "--verbose release" From 83585487570b6c1677084a3f96bce7e510a7deee Mon Sep 17 00:00:00 2001 From: icweaver Date: Mon, 27 Oct 2025 16:51:47 -0700 Subject: [PATCH 10/17] is a name needed? --- .github/workflows/CI_dev.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI_dev.yml b/.github/workflows/CI_dev.yml index efc8791000..eb70987353 100644 --- a/.github/workflows/CI_dev.yml +++ b/.github/workflows/CI_dev.yml @@ -8,6 +8,7 @@ on: - cron: '15 2 * * *' # 2:15 AM UTC every day jobs: - uses: ./.github/workflows/CI.yml - with: - test_args: "--verbose release" + test-dev: + uses: ./.github/workflows/CI.yml + with: + test_args: "--verbose release" From 9850f7b8318771f9bda81abfdb74eb7ca5fc6720 Mon Sep 17 00:00:00 2001 From: icweaver Date: Mon, 27 Oct 2025 16:53:50 -0700 Subject: [PATCH 11/17] yup --- .github/workflows/CI_release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI_release.yml b/.github/workflows/CI_release.yml index 5ae7880bb7..1696d1c600 100644 --- a/.github/workflows/CI_release.yml +++ b/.github/workflows/CI_release.yml @@ -8,6 +8,7 @@ on: - cron: '15 2 * * *' # 2:15 AM UTC every day jobs: - uses: ./.github/workflows/CI.yml - with: - test_args: "--verbose release" + test-release: + uses: ./.github/workflows/CI.yml + with: + test_args: "--verbose release" From c7e167001ed118335b90607d46119c75829564d6 Mon Sep 17 00:00:00 2001 From: Ian Weaver Date: Mon, 27 Oct 2025 17:17:29 -0700 Subject: [PATCH 12/17] Update dev instructions --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3f960479d4..38fe6134b1 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ JuliaAstro.github.io [![docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaastro.org/) [![Build](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/Documentation.yml/badge.svg)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/Documentation.yml) [![Deploy](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/pages/pages-build-deployment/badge.svg?branch=gh-pages)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/pages/pages-build-deployment) + [![Test JuliaAstro (release)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/CI_release.yml/badge.svg)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/CI_release.yml) [![Test JuliaAstro (dev)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/CI_dev.yml/badge.svg)](https://github.com/JuliaAstro/JuliaAstro.github.io/actions/workflows/CI_dev.yml) @@ -99,12 +100,14 @@ All in all, to add a new case study: 1. Update the content in the new file with your case study text. 1. Add an entry to `JuliaAstro.github.io/docs/case_studies//config.json` with your new case study filename. Note that trailing commas are not supported in the JSON spec. -## Testing locally / developer docs +## Developer docs + +### Documentation Add [LiveServer.jl](https://github.com/JuliaDocs/LiveServer.jl) to your global env and then run the following in the `JuliaAstro.github.io/` folder: ```julia-repl -> julia --proj=docs/ +julia --proj=docs/ julia> using LiveServer @@ -118,3 +121,24 @@ The `include_dirs` arg allows our internal Revise worklow to pick up changes in See our [Contributing page](https://juliaastro.org/home/#Contributing) for more. +### Testing + +Run all tests: + +```julia-repl +julia --proj + +julia> ] + +pkg> test +``` + +Run specific tests (currently `release` and `dev`): + +```julia-repl +julia --proj + +julia> import Pkg + +julia> Pkg.test("JuliaAstroDocs"; test_args=`--verbose release`) # or dev +``` From 022ba101fab9e12e4ce781d370717d956b0a2075 Mon Sep 17 00:00:00 2001 From: icweaver Date: Mon, 27 Oct 2025 18:38:32 -0700 Subject: [PATCH 13/17] re-org tests --- .github/workflows/CI_dev.yml | 2 +- .github/workflows/CI_release.yml | 2 +- Project.toml | 8 +++----- README.md | 4 ++-- test/Project.toml | 31 ------------------------------- test/_packages.jl | 31 +++++++++++++++++++++++++++++++ test/dev.jl | 23 ----------------------- test/packages_dev.jl | 3 +++ test/packages_release.jl | 3 +++ test/release.jl | 24 ------------------------ test/runtests.jl | 1 + 11 files changed, 45 insertions(+), 87 deletions(-) create mode 100644 test/_packages.jl delete mode 100644 test/dev.jl create mode 100644 test/packages_dev.jl create mode 100644 test/packages_release.jl delete mode 100644 test/release.jl diff --git a/.github/workflows/CI_dev.yml b/.github/workflows/CI_dev.yml index eb70987353..c2f2766df3 100644 --- a/.github/workflows/CI_dev.yml +++ b/.github/workflows/CI_dev.yml @@ -11,4 +11,4 @@ jobs: test-dev: uses: ./.github/workflows/CI.yml with: - test_args: "--verbose release" + test_args: "--verbose packages_dev" diff --git a/.github/workflows/CI_release.yml b/.github/workflows/CI_release.yml index 1696d1c600..329bcd2847 100644 --- a/.github/workflows/CI_release.yml +++ b/.github/workflows/CI_release.yml @@ -11,4 +11,4 @@ jobs: test-release: uses: ./.github/workflows/CI.yml with: - test_args: "--verbose release" + test_args: "--verbose packages_release" diff --git a/Project.toml b/Project.toml index 991ab7a26f..648b4a7921 100644 --- a/Project.toml +++ b/Project.toml @@ -1,14 +1,12 @@ name = "JuliaAstroDocs" uuid = "5ba9df79-bc07-467f-bade-66a1d49082bd" +[workspace] +projects = ["test", "docs"] + [deps] -ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc" TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" [compat] -ParallelTestRunner = "2.0.1" TypedTables = "1.4.6" julia = "1.10" - -[workspace] -projects = ["test", "docs"] diff --git a/README.md b/README.md index 38fe6134b1..86435c6865 100644 --- a/README.md +++ b/README.md @@ -133,12 +133,12 @@ julia> ] pkg> test ``` -Run specific tests (currently `release` and `dev`): +Run specific tests (currently `packages_release` and `packages_dev`): ```julia-repl julia --proj julia> import Pkg -julia> Pkg.test("JuliaAstroDocs"; test_args=`--verbose release`) # or dev +julia> Pkg.test("JuliaAstroDocs"; test_args=`--verbose packages_release`) # or packages_dev ``` diff --git a/test/Project.toml b/test/Project.toml index ee177efb27..c9bb6b454f 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,37 +1,6 @@ [deps] -ASDF2 = "da470b1c-b0a8-4533-b4d1-e613846a4bd7" -AstroAngles = "5c4adb95-c1fc-4c53-b4ea-2a94080c53d2" -AstroImages = "fe3fc30c-9b16-11e9-1c73-17dabf39f4ad" -AstroLib = "c7932e45-9af1-51e7-9da9-f004cd3a462b" -AstroTime = "c61b5328-d09d-5e37-a9a8-0eb41c39009c" -Astroalign = "7f4629bd-323a-4fad-ad42-4ee56350f27f" -BoxLeastSquares = "6c353534-c22b-44cc-9076-7b904de9fadc" -CALCEPH = "1537fe66-4725-5aba-80f4-3a74792cecc1" -CCDReduction = "b790e538-3052-4cb9-9f1f-e05859a455f5" -CFITSIO = "3b1b4be9-1499-4b22-8d78-7db3344d1961" -Cosmology = "76746363-e552-5dba-9a5a-cef6fa9cc5ab" -DustExtinction = "fb44c06c-c62f-5397-83f5-69249e0a3c8e" -ERFA = "17511681-8477-586a-8d98-4cfd5a1f2ec3" -EarthOrientation = "732a3c5d-d6c0-58bc-adb1-1b51709a25e2" -EphemerisSources = "858900df-f7ae-402a-aa8c-3e4ef85aa271" -FITSIO = "525bcba6-941b-5504-bd06-fd0dc1a4d2eb" -GeneralAstrodynamics = "8068df5b-8501-4530-bd82-d24d3c9619db" -Healpix = "9f4e344d-96bc-545a-84a3-ae6b9e1b672b" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" JuliaAstroDocs = "5ba9df79-bc07-467f-bade-66a1d49082bd" -LACosmic = "a188e134-b1c0-4a25-bc7e-93a99f0f0e06" -LombScargle = "fc60dff9-86e7-5f2f-a8a0-edeadbb75bd9" -Orbits = "88f3d70c-3a4c-11ed-1389-4902f2e49de8" -PSFModels = "9ba017d1-7760-46cd-84a3-1e79e9ae9ddc" ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc" -Photometry = "af68cb61-81ac-52ed-8703-edc140936be4" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -Reproject = "d1dcc2e6-806e-11e9-2897-3f99785db2ae" -SAOImageDS9 = "dbce9b26-8eb4-4825-964b-d4940cf8daff" -SPICE = "5bab7191-041a-5c2e-a744-024b9c3a5062" -SkyCoords = "fc659fc5-75a3-5475-a2ea-3da92c065361" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -Transits = "2e59a628-7bac-4d38-8059-3a73ba0928ab" -UnitfulAstro = "6112ee07-acf9-5e0f-b108-d242c714bf9f" -WCS = "15f3aee2-9e10-537f-b834-a6fb8bdb944d" -XPA = "d310a076-6a08-52b6-ab78-79baa254182b" diff --git a/test/_packages.jl b/test/_packages.jl new file mode 100644 index 0000000000..0513636c35 --- /dev/null +++ b/test/_packages.jl @@ -0,0 +1,31 @@ +function test_packages(mode) + @testset "Compatibility - $(mode)" begin + for package in packages_juliaastro + p_name = package.name + @info string("Adding: ", p_name) + @testset "$(p_name)" begin + if mode == :release + @test Pkg.add(chopsuffix(p_name, ".jl")) == nothing + else + @test Pkg.add(url=package.repo) == nothing + end + end + end + + @testset "Precompilation" begin + @test Pkg.precompile(; strict=true) == nothing + end + + @testset "Package loading" begin + for package in packages_juliaastro + p_name = package.name + @info string("Loading: ", p_name) + @testset "$(p_name)" begin + @test eval(quote + @time_imports using $(Symbol(chopsuffix(p_name, ".jl"))) + end) == nothing + end + end + end + end +end diff --git a/test/dev.jl b/test/dev.jl deleted file mode 100644 index 1d030e4dcc..0000000000 --- a/test/dev.jl +++ /dev/null @@ -1,23 +0,0 @@ -@testset "Development versions are compatible" begin - ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0 - - for package in packages_juliaastro - @testset "$(package.name)" begin - @test Pkg.add(url=package.repo) == nothing - end - end - - @testset "Precompilation" begin - @test Pkg.precompile(; strict=true) == nothing - end - - @testset "Package loading" begin - for package in packages_juliaastro - @testset "$(package.name)" begin - @test eval(quote - @time_imports using $(Symbol(chopsuffix(package.name, ".jl"))) - end) == nothing - end - end - end -end diff --git a/test/packages_dev.jl b/test/packages_dev.jl new file mode 100644 index 0000000000..798b11ee63 --- /dev/null +++ b/test/packages_dev.jl @@ -0,0 +1,3 @@ +include("_packages.jl") + +test_packages(:dev) diff --git a/test/packages_release.jl b/test/packages_release.jl new file mode 100644 index 0000000000..70a041c054 --- /dev/null +++ b/test/packages_release.jl @@ -0,0 +1,3 @@ +include("packages.jl") + +test_packages(:release) diff --git a/test/release.jl b/test/release.jl deleted file mode 100644 index 5dccee486d..0000000000 --- a/test/release.jl +++ /dev/null @@ -1,24 +0,0 @@ -@testset "Latest release versions are compatible" begin - for package in packages_juliaastro - p_name = package.name - # TODO: Include in testing when next release after v0.11.0 - p_name == "GeneralAstroDynamics" && continue - @testset "$(p_name)" begin - @test Pkg.add(chopsuffix(p_name, ".jl")) == nothing - end - end - - @testset "Precompilation" begin - @test Pkg.precompile(; strict=true) == nothing - end - - @testset "Package loading" begin - for package in packages_juliaastro - @testset "$(package.name)" begin - @test eval(quote - @time_imports using $(Symbol(chopsuffix(package.name, ".jl"))) - end) == nothing - end - end - end -end diff --git a/test/runtests.jl b/test/runtests.jl index b57dd8e8ed..7c6976a764 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -25,5 +25,6 @@ end args = parse_args(Base.ARGS) testsuite = find_tests(@__DIR__) +delete!(testsuite, "_packages") runtests(JuliaAstroDocs, args; testsuite, init_code) From 9f9f2146fc46893ec24b43672a45ccb1796ff593 Mon Sep 17 00:00:00 2001 From: icweaver Date: Mon, 27 Oct 2025 19:55:12 -0700 Subject: [PATCH 14/17] dial back test frequency for released versions --- .github/workflows/CI_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_release.yml b/.github/workflows/CI_release.yml index 329bcd2847..8f61f2879b 100644 --- a/.github/workflows/CI_release.yml +++ b/.github/workflows/CI_release.yml @@ -5,7 +5,7 @@ on: branches: [main] pull_request: schedule: - - cron: '15 2 * * *' # 2:15 AM UTC every day + - cron: '15 2 * * 1' # 2:15 AM UTC every Monday jobs: test-release: From 50aa114cb52ee866a08b388cbd910319ddeaa103 Mon Sep 17 00:00:00 2001 From: icweaver Date: Mon, 27 Oct 2025 20:45:16 -0700 Subject: [PATCH 15/17] spectra --- test/_packages.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/_packages.jl b/test/_packages.jl index 0513636c35..3bfde0ec5e 100644 --- a/test/_packages.jl +++ b/test/_packages.jl @@ -5,7 +5,12 @@ function test_packages(mode) @info string("Adding: ", p_name) @testset "$(p_name)" begin if mode == :release - @test Pkg.add(chopsuffix(p_name, ".jl")) == nothing + if p_name == "Spectra.jl" + # TODO: Register + @test Pkg.add(url="https://github.com/JuliaAstro/Spectra.jl") == nothing + else + @test Pkg.add(chopsuffix(p_name, ".jl")) == nothing + end else @test Pkg.add(url=package.repo) == nothing end From a4866b81c822774162bfb387748399b40dd3c50c Mon Sep 17 00:00:00 2001 From: icweaver Date: Mon, 27 Oct 2025 21:38:17 -0700 Subject: [PATCH 16/17] typo --- test/packages_release.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/packages_release.jl b/test/packages_release.jl index 70a041c054..d1f52078b7 100644 --- a/test/packages_release.jl +++ b/test/packages_release.jl @@ -1,3 +1,3 @@ -include("packages.jl") +include("_packages.jl") test_packages(:release) From 8711ab9272a0fab862c6240b924e63f8b0a0fd54 Mon Sep 17 00:00:00 2001 From: Ian Weaver Date: Sat, 1 Nov 2025 12:51:33 -0700 Subject: [PATCH 17/17] Update test/_packages.jl Co-authored-by: Chris Garling --- test/_packages.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/_packages.jl b/test/_packages.jl index 3bfde0ec5e..5cb761f182 100644 --- a/test/_packages.jl +++ b/test/_packages.jl @@ -11,8 +11,10 @@ function test_packages(mode) else @test Pkg.add(chopsuffix(p_name, ".jl")) == nothing end - else + elseif mode == :dev @test Pkg.add(url=package.repo) == nothing + else + throw(ArgumentError("`mode` argument to `test_packages` must be either `:release` or `:dev`.")) end end end