Skip to content
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
16 changes: 8 additions & 8 deletions lib/OptimizationNLPModels/src/OptimizationNLPModels.jl
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
module OptimizationNLPModels

using NLPModels
# The model types are the documented entry point for this package: you hand an
# `AbstractNLPModel` to `OptimizationProblem`/`OptimizationFunction`, and
# `build_nlpmodel_meta` hands an `NLPModelMeta` back. Those types are re-surfaced by
# name below; NLPModels' ~200 evaluation functions (`obj`, `grad`, `hess`, `jprod!`, …)
# are not — they are reached through the exported `NLPModels` module binding, as the
# docs spell them. Everything stays owned and documented upstream in NLPModels.jl.
using NLPModels: AbstractNLPModel, AbstractNLSModel, Counters, NLPModelMeta,
NLSCounters, NLSMeta
using ADTypes
using NLPModels: NLPModels, AbstractNLPModel, AbstractNLSModel, Counters, NLPModelMeta,
NLSCounters, NLSMeta, bound_constrained, has_bounds, has_equalities,
has_inequalities, unconstrained
using ADTypes: ADTypes
# Not re-exported: the optimization API comes from `Optimization`/`OptimizationBase`,
# which the user loads directly. This package's public surface is its own solvers.
using OptimizationBase
import SciMLBase
using SparseArrays
using OptimizationBase: OptimizationBase, MaxSense, OptimizationFunction
using SciMLBase: SciMLBase, OptimizationProblem
using SparseArrays: SparseArrays, SparseMatrixCSC, findnz, nnz
import OptimizationBase.LinearAlgebra: mul!

export NLPModels, build_nlpmodel_meta, NLPModelsAdaptor
Expand Down Expand Up @@ -81,7 +81,7 @@ function SciMLBase.OptimizationProblem(
# The number of variables, geometry of u0, etc.. are valid and were checked when the
# nlpmodel was created.

return OptimizationBase.OptimizationProblem(
return OptimizationProblem(
f, u0; lb = lb, ub = ub, lcons = lcons, ucons = ucons, sense = sense, kwargs...
)
end
Expand Down
4 changes: 0 additions & 4 deletions lib/OptimizationNLPModels/test/qa/qa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ const NLPMODELS_REEXPORTS = (
)

# ExplicitImports findings, all tracked against SciML/Optimization.jl:
# * no_implicit_imports broken: the module relies on `using`
# module names (SciMLBase/OptimizationBase/...) that cannot be made
# explicit without restructuring.
# * the ignored *_are_public / *_via_owners names are owned by SciMLBase,
# OptimizationBase, the backend, or Base and are not (yet) declared public;
# the proper fix is upstream `public` declarations, not a local change.
Expand All @@ -37,7 +34,6 @@ run_qa(
# release (SciMLBase 3.24.0); fix belongs upstream via a `public` declaration.
all_qualified_accesses_are_public = (; ignore = (:NoAD,)),
),
ei_broken = (:no_implicit_imports,),
reexports_allow = NLPMODELS_REEXPORTS,
)

Expand Down
Loading