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

Add function to query version number #81

Merged
merged 1 commit into from
Jan 8, 2021
Merged
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: 3 additions & 1 deletion src/Tulip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ using SparseArrays

using TimerOutputs

version() = v"0.7.0"

include("utils.jl")

# Linear algebra
Expand Down Expand Up @@ -42,4 +44,4 @@ include("model.jl")
include("Interfaces/tulip_julia_api.jl")
include("Interfaces/MOI/MOI_wrapper.jl")

end # module
end # module
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
39 changes: 25 additions & 14 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Test

using LinearAlgebra
using SparseArrays
using Test
using TOML

using Tulip
TLP = Tulip
Expand All @@ -10,23 +10,32 @@ import Convex

const TvTYPES = [Float32, Float64, BigFloat]

# write your own tests here
const testdir = dirname(@__FILE__)
# Check That Tulip.version() matches what's in the Project.toml
@testset "Tulip" begin

tlp_ver = Tulip.version()
toml_ver = TOML.parsefile("../Project.toml")["version"]
@test tlp_ver == VersionNumber(toml_ver)

@testset "Unit tests" begin
include("Core/problemData.jl")
include("IPM/HSD.jl")
include("IPM/MPC.jl")
end

@testset "KKT" begin
include("KKT/KKT.jl")
end
@testset "Core" begin
include("Core/problemData.jl")
end

@testset "Presolve" begin
include("Presolve/presolve.jl")
end
@testset "IPM" begin
include("IPM/HSD.jl")
include("IPM/MPC.jl")
end

@testset "KKT" begin
include("KKT/KKT.jl")
end

@testset "Presolve" begin
include("Presolve/presolve.jl")
end
end # UnitTest

@testset "Examples" begin
include("examples.jl")
Expand All @@ -49,3 +58,5 @@ end
end
end
end

end # Tulip tests