Skip to content

Commit

Permalink
Merge pull request #807 from SebastianM-C/rm_pkg
Browse files Browse the repository at this point in the history
refactor: remove dependency on Pkg
  • Loading branch information
ChrisRackauckas authored Aug 22, 2024
2 parents ccc63d2 + c609481 commit 4d4c78a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
LoggingExtras = "e6f89c97-d47a-5376-807f-9c37f3926c36"
OptimizationBase = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Expand All @@ -30,7 +29,6 @@ LinearAlgebra = "1.10"
Logging = "1.10"
LoggingExtras = "0.4, 1"
OptimizationBase = "1.3.3"
Pkg = "1"
Printf = "1.10"
ProgressLogging = "0.1"
Reexport = "1.2"
Expand Down
1 change: 0 additions & 1 deletion src/Optimization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ end

using Logging, ProgressLogging, ConsoleProgressMonitor, TerminalLoggers, LoggingExtras
using ArrayInterface, Base.Iterators, SparseArrays, LinearAlgebra
using Pkg

import OptimizationBase: instantiate_function, OptimizationCache, ReInitCache
import SciMLBase: OptimizationProblem,
Expand Down
15 changes: 0 additions & 15 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,6 @@ function _check_and_convert_maxtime(maxtime)
end
end

function check_pkg_version(pkg::String, ver::String;
branch::Union{String, Nothing} = nothing)
deps = Pkg.dependencies()
pkg_info = Dict{String, Pkg.Types.PackageInfo}()
for (uuid, dep) in deps
dep.is_direct_dep || continue
dep.version === nothing && continue
pkg_info[dep.name] = dep
end

return (isnothing(branch) | (pkg_info[pkg].git_revision == branch)) ?
pkg_info[pkg].version >= VersionNumber(ver) :
pkg_info[pkg].version > VersionNumber(ver)
end

# RetCode handling for BBO and others.
using SciMLBase: ReturnCode

Expand Down

0 comments on commit 4d4c78a

Please sign in to comment.