diff --git a/Project.toml b/Project.toml index cd910a8..33b45c3 100644 --- a/Project.toml +++ b/Project.toml @@ -4,32 +4,33 @@ authors = ["Aman Pandey"] version = "0.1.0" [deps] -FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" -Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" -ResumableFunctions = "c5292f4c-5179-55e1-98c5-05642aab7184" -StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -ProgressBars = "49802e3a-d2f1-5c88-81d8-b72133a6f568" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -Metadata = "4fb893c1-3164-4f58-823a-cb4c64eabb4f" -HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" -NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" +FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" FITSIO = "525bcba6-941b-5504-bd06-fd0dc1a4d2eb" +HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" Intervals = "d8418881-c3e1-53bb-8760-2df7ec849ed5" +Metadata = "4fb893c1-3164-4f58-823a-cb4c64eabb4f" +NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +ProgressBars = "49802e3a-d2f1-5c88-81d8-b72133a6f568" +ResumableFunctions = "c5292f4c-5179-55e1-98c5-05642aab7184" +Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" [compat] -julia = "1.7" -FFTW = "1.4" -Distributions = "0.25" -ResumableFunctions = "0.6" -StatsBase = "0.33" -ProgressBars = "1.4" DataFrames = "1.3" -Metadata = "0.3" -HDF5 = "0.16" +Distributions = "0.25" +FFTW = "1.4" FITSIO = "0.16" +HDF5 = "0.16" Intervals = "1.8" +Metadata = "0.3" NaNMath = "0.3, 1" +ProgressBars = "1.4" +ResumableFunctions = "0.6" +StatsBase = "0.33" +julia = "1.7" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/src/conftest.jl b/src/conftest.jl new file mode 100644 index 0000000..78fa61b --- /dev/null +++ b/src/conftest.jl @@ -0,0 +1,37 @@ +using Test +using Pkg +using Plots + +gr() + +function get_package_version(pkg_name) + for (_, pkg) in Pkg.dependencies() + if pkg.name == pkg_name + return pkg.version + end + end + return "Not Found" +end + +function show_tested_versions() + tested_versions = Dict( + "Julia" => VERSION, + "Plots" => get_package_version("Plots") + ) + + println("Tested Versions:") + for (pkg, ver) in tested_versions + println(" $pkg: $ver") + end +end + +function runtests() + show_tested_versions() + @testset "Stingray.jl Tests" begin + include(joinpath(@__DIR__, "..", "test", "test_fourier.jl")) + include(joinpath(@__DIR__, "..", "test", "test_gti.jl")) + end +end + + +runtests() diff --git a/test/runtests.jl b/test/runtests.jl index a4460f4..a65ad05 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,5 +2,11 @@ using Stingray using Test using FFTW, Distributions, Statistics, StatsBase, Metadata, HDF5 -include("test_fourier.jl") -include("test_gti.jl") +include("../src/conftest.jl") + +@info "Running tests for Stingray.jl" + +@testset "Stingray.jl Tests" begin + include("test_fourier.jl") + include("test_gti.jl") +end