Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests for Julia v1.11 #422

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.10'
- run: make lint
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
Expand All @@ -33,7 +31,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.10'
- '1.11'
os:
- ubuntu-latest
arch:
Expand Down
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ MatrixCorrectionTools = "1.2.0"
Optim = "1.0.0"
Optimisers = "0.2, 0.3"
PositiveFactorizations = "0.2"
REPL = "1.11.0"
Random = "1.9"
Requires = "1"
Rocket = "1.8.0"
Expand Down Expand Up @@ -95,9 +96,10 @@ Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
ReTestItems = "817f1d60-ba6b-4fd5-9520-3cf149f6a823"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestSetExtensions = "98d24dd4-01ad-11ea-1b02-c9a08f80db04"

[targets]
test = ["Aqua", "CpuId", "ReTestItems", "Test", "Pkg", "Logging", "InteractiveUtils", "TestSetExtensions", "Coverage", "Dates", "Distributed", "Documenter", "BenchmarkCI", "BenchmarkTools", "PkgBenchmark", "StableRNGs", "Optimisers", "DiffResults", "ExponentialFamilyProjection"]
test = ["Aqua", "CpuId", "ReTestItems", "Test", "Pkg", "Logging", "InteractiveUtils", "TestSetExtensions", "Coverage", "Dates", "Distributed", "Documenter", "BenchmarkCI", "BenchmarkTools", "PkgBenchmark", "StableRNGs", "Optimisers", "DiffResults", "ExponentialFamilyProjection", "REPL"]
2 changes: 1 addition & 1 deletion test/ext/ReactiveMPProjectionExt/rules/out_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

q_ins_m_out_incomings = [
(FactorizedJoint((NormalMeanVariance(2, 2),)), NormalMeanVariance(0, 1)),
(FactorizedJoint((Gamma(3, 4),)), Gamma(2, 3)),
(FactorizedJoint((Gamma(2, 1),)), Gamma(2, 2)),
(FactorizedJoint((Beta(5, 4),)), Beta(5, 5)),
(FactorizedJoint((Rayleigh(4),)), Rayleigh(5.2)),
(FactorizedJoint((Geometric(0.3),)), Geometric(0.9)),
Expand Down
6 changes: 5 additions & 1 deletion test/nodes/nodes_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,19 @@ end
end

@testitem "@node macro should generate a documentation entry for a newly specified node" begin
using REPL # `REPL` changes the docstring output format

struct DummyNodeForDocumentationStochastic end
struct DummyNodeForDocumentationDeterministic end

@node DummyNodeForDocumentationStochastic Stochastic [out, x, (y, aliases = [yy])]

@node DummyNodeForDocumentationDeterministic Deterministic [out, (x, aliases = [xx, xxx]), y]

documentation = string(Base.doc(Base.Docs.Binding(ReactiveMP, :is_predefined_node)))
binding = @doc(ReactiveMP.is_predefined_node)
@test !isnothing(binding)

documentation = string(binding)
@test occursin(r"DummyNodeForDocumentationStochastic.*Stochastic.*out, x, y \(or yy\)", documentation)
@test occursin(r"DummyNodeForDocumentationDeterministic.*Deterministic.*out, x \(or xx, xxx\), y", documentation)
end
Expand Down
4 changes: 2 additions & 2 deletions test/rules/continuous_transition/x_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

metal = CTMeta(transformation)
Ly = rand(rng, dy, dy)
μy, Σy = rand(rng, dy), Ly * Ly'
μy, Σy = rand(rng, dy), Ly * Ly' + dydx * I

qy = MvNormalMeanCovariance(μy, Σy)
qa = MvNormalMeanCovariance(vec(mA), diageye(dydx))
Expand Down Expand Up @@ -79,7 +79,7 @@

metal = CTMeta(transformation)
Ly = rand(rng, dy, dy)
μy, Σy = rand(rng, dy), Ly * Ly'
μy, Σy = rand(rng, dy), Ly * Ly' + dydx * I

qy = MvNormalMeanCovariance(μy, Σy)
qa = MvNormalMeanCovariance(vec(mA), diageye(dydx))
Expand Down
Loading