From 32316abb441d6375a36cce2077fca00a9fd6bcfe Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sun, 18 May 2025 11:32:11 -0500 Subject: [PATCH 1/3] Fix the unit tests --- Project.toml | 3 ++- test/Project.toml | 2 +- test/test_allocations.jl | 15 ++++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index 8a422b0..1db7d5d 100644 --- a/Project.toml +++ b/Project.toml @@ -20,8 +20,9 @@ QuadraticModelsQPSReaderExt = "QPSReader" [compat] LinearAlgebra = "1.10" LinearOperators = "2.3" -NLPModels = "0.21.4" +NLPModels = "0.21.5" NLPModelsModifiers = "0.7" +QPSReader = "0.2.1" SolverCore = "0.3" SparseArrays = "1.10" SparseMatricesCOO = "0.2.3" diff --git a/test/Project.toml b/test/Project.toml index d1aea91..817d20b 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -16,7 +16,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] ADNLPModels = "0.8" LinearOperators = "2" -NLPModels = "0.21.4" +NLPModels = "0.21.5" NLPModelsModifiers = "0.7" NLPModelsTest = "0.10" QPSReader = "0.2" diff --git a/test/test_allocations.jl b/test/test_allocations.jl index e04bb60..b568c2c 100644 --- a/test/test_allocations.jl +++ b/test/test_allocations.jl @@ -11,28 +11,32 @@ end @testset "allocs QPSData" begin for problem in qp_problems_Matrix nlp_qps = eval(Symbol(problem * "_QPSData"))() - test_only_zeros(test_allocs_nlpmodels(nlp_qps)) + allocs = test_allocs_nlpmodels(nlp_qps; exclude=[jac_op]) + test_only_zeros(allocs) end end @testset "allocs QP_dense" begin for problem in qp_problems_Matrix nlp_qm_dense = eval(Symbol(problem * "_QP_dense"))() - test_only_zeros(test_allocs_nlpmodels(nlp_qm_dense)) + allocs = test_allocs_nlpmodels(nlp_qm_dense; exclude=[jac_op]) + test_only_zeros(allocs) end end @testset "allocs COO QPSData" begin for problem in qp_problems_COO nlp_qps = eval(Symbol(problem * "_QPSData"))() - test_only_zeros(test_allocs_nlpmodels(nlp_qps)) + allocs = test_allocs_nlpmodels(nlp_qps; exclude=[jac_op]) + test_only_zeros(allocs) end end @testset "allocs COO QP" begin for problem in qp_problems_COO nlp_qm_dense = eval(Symbol(problem * "_QP"))() - test_only_zeros(test_allocs_nlpmodels(nlp_qm_dense)) + allocs = test_allocs_nlpmodels(nlp_qm_dense; exclude=[jac_op]) + test_only_zeros(allocs) end end @@ -41,7 +45,8 @@ end nlp = eval(Symbol(problem))() x = nlp.meta.x0 nlp_qm = QuadraticModel(nlp, x) - test_only_zeros(test_allocs_nlpmodels(nlp_qm)) + allocs = test_allocs_nlpmodels(nlp_qm; exclude=[jac_op]) + test_only_zeros(allocs) end end end From 23f5cf87a77dfb2d709bd39b20b091ced9ea4532 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sun, 18 May 2025 11:40:41 -0500 Subject: [PATCH 2/3] Test the linear API --- test/test_allocations.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test_allocations.jl b/test/test_allocations.jl index b568c2c..33e2b78 100644 --- a/test/test_allocations.jl +++ b/test/test_allocations.jl @@ -11,7 +11,7 @@ end @testset "allocs QPSData" begin for problem in qp_problems_Matrix nlp_qps = eval(Symbol(problem * "_QPSData"))() - allocs = test_allocs_nlpmodels(nlp_qps; exclude=[jac_op]) + allocs = test_allocs_nlpmodels(nlp_qps; linear_api=true, exclude=[jac_op]) test_only_zeros(allocs) end end @@ -19,7 +19,7 @@ end @testset "allocs QP_dense" begin for problem in qp_problems_Matrix nlp_qm_dense = eval(Symbol(problem * "_QP_dense"))() - allocs = test_allocs_nlpmodels(nlp_qm_dense; exclude=[jac_op]) + allocs = test_allocs_nlpmodels(nlp_qm_dense; linear_api=true, exclude=[jac_op]) test_only_zeros(allocs) end end @@ -27,7 +27,7 @@ end @testset "allocs COO QPSData" begin for problem in qp_problems_COO nlp_qps = eval(Symbol(problem * "_QPSData"))() - allocs = test_allocs_nlpmodels(nlp_qps; exclude=[jac_op]) + allocs = test_allocs_nlpmodels(nlp_qps; linear_api=true, exclude=[jac_op]) test_only_zeros(allocs) end end @@ -35,7 +35,7 @@ end @testset "allocs COO QP" begin for problem in qp_problems_COO nlp_qm_dense = eval(Symbol(problem * "_QP"))() - allocs = test_allocs_nlpmodels(nlp_qm_dense; exclude=[jac_op]) + allocs = test_allocs_nlpmodels(nlp_qm_dense; linear_api=true, exclude=[jac_op]) test_only_zeros(allocs) end end @@ -45,7 +45,7 @@ end nlp = eval(Symbol(problem))() x = nlp.meta.x0 nlp_qm = QuadraticModel(nlp, x) - allocs = test_allocs_nlpmodels(nlp_qm; exclude=[jac_op]) + allocs = test_allocs_nlpmodels(nlp_qm; linear_api=true, exclude=[jac_op]) test_only_zeros(allocs) end end From 0d408a1b6a93757692c0046ba59a48782f0748f1 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Sun, 18 May 2025 11:41:26 -0500 Subject: [PATCH 3/3] Use pre-release instead of nightly in CI --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51658fd..43e6573 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,15 +22,15 @@ jobs: os: macos-latest arch: arm64 allow_failure: false - - version: 'nightly' + - version: 'pre' os: ubuntu-latest arch: x64 allow_failure: true - - version: 'nightly' + - version: 'pre' os: macos-latest arch: x64 allow_failure: true - - version: 'nightly' + - version: 'pre' os: windows-latest arch: x64 allow_failure: true