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

Drop Compat / Julia v0.6 Support #436

Merged
merged 1 commit into from
Feb 11, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ repo = "https://github.com/JuliaOpt/Pajarito.jl.git"
version = "0.6.2"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
ConicBenchmarkUtilities = "e95a7839-07fb-532d-9a0e-071766bb5168"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MathProgBase = "fdba3010-5040-5b88-9595-932c9decdf73"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
Compat = "~1.0, ~2.0"
ConicBenchmarkUtilities = "~0.3.1"
ECOS = "≥ 0.9.1"
GLPKMathProgInterface = "≥ 0.4.0"
Expand All @@ -24,6 +25,7 @@ ECOS = "e2685f51-7e38-5353-a97d-a921fd2c8199"
GLPKMathProgInterface = "3c7084bd-78ad-589a-b5bb-dbd673274bea"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
SCS = "c946c3f1-0d1f-5ce8-9dea-7daa1f7e2d13"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["GLPKMathProgInterface", "SCS", "ECOS", "Logging"]
test = ["Test", "GLPKMathProgInterface", "SCS", "ECOS", "Logging"]
7 changes: 0 additions & 7 deletions REQUIRE

This file was deleted.

31 changes: 4 additions & 27 deletions src/Pajarito.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,15 @@ of mixed-integer linear (or second-order cone) programming
problems that approximate the original MICP, until convergence.
=========================================================#

__precompile__()


module Pajarito

import MathProgBase

using Compat.Printf
using Compat.SparseArrays
using Compat.LinearAlgebra

import Compat: undef
import Compat: @warn
import Compat: stdout
import Compat: stderr
import Compat: findall
import Compat: hasmethod
import Compat: rmul!
import Compat: norm
using Printf
using SparseArrays
using LinearAlgebra

# Needed for only for Julia v0.6 compatability
if VERSION < v"0.7.0-"
eigen! = eigfact!
end

if VERSION > v"0.7.0-"
# this is required because findall return type changed in v0.7
function SparseArrays.findnz(A::AbstractMatrix)
I = findall(!iszero, A)
return (getindex.(I, 1), getindex.(I, 2), A[I])
end
end
using ConicBenchmarkUtilities # to bring in SparseArrays.findnz impl

include("conic_dual_solver.jl")
include("solver.jl")
Expand Down
3 changes: 0 additions & 3 deletions test/REQUIRE

This file was deleted.

20 changes: 5 additions & 15 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,13 @@ using MathProgBase
import ConicBenchmarkUtilities
using Pajarito

using Compat.Test
using Compat.Printf
using Test
using Printf

import Compat: stdout
import Compat: stderr
using Logging
disable_logging(Logging.Error)


if VERSION < v"0.7.0-"
jump_path = Pkg.dir("JuMP")
end

if VERSION > v"0.7.0-"
using Logging
disable_logging(Logging.Error)

jump_path = joinpath(dirname(pathof(JuMP)), "..")
end
jump_path = joinpath(dirname(pathof(JuMP)), "..")

# Tests absolute tolerance and Pajarito printing level
TOL = 1e-3
Expand Down