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
11 changes: 2 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
docs/build/
*.jl.cov
*.jl.*.cov
*.jl.mem
deps/deps.jl
docs/build
docs/src/release_notes.md
Manifest.toml
.DS_Store
test/MOItests.jl
test/quadratic_tests.jl
*.json
*.txt
66 changes: 65 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,65 @@
import Documenter
import ParametricOptInterface

# ==============================================================================
# Modify the release notes
# ==============================================================================

function fix_release_line(
line::String,
url::String = "https://github.com/jump-dev/ParametricOptInterface.jl",
)
# (#XXXX) -> ([#XXXX](url/issue/XXXX))
while (m = match(r"\(\#([0-9]+)\)", line)) !== nothing
id = m.captures[1]
line = replace(line, m.match => "([#$id]($url/issues/$id))")
end
# ## Version X.Y.Z -> [Version X.Y.Z](url/releases/tag/vX.Y.Z)
while (m = match(r"\#\# Version ([0-9]+.[0-9]+.[0-9]+)", line)) !== nothing
tag = m.captures[1]
line = replace(
line,
m.match => "## [Version $tag]($url/releases/tag/v$tag)",
)
end
# ## vX.Y.Z -> [vX.Y.Z](url/releases/tag/vX.Y.Z)
while (m = match(r"\#\# (v[0-9]+.[0-9]+.[0-9]+)", line)) !== nothing
tag = m.captures[1]
line = replace(line, m.match => "## [$tag]($url/releases/tag/$tag)")
end
return line
end

function _fix_release_lines(changelog, release_notes, args...)
open(release_notes, "w") do io
for line in readlines(changelog; keep = true)
write(io, fix_release_line(line, args...))
end
end
return
end

_fix_release_lines(
joinpath(@__DIR__, "src", "changelog.md"),
joinpath(@__DIR__, "src", "release_notes.md"),
)

function _add_edit_url(filename, url)
contents = read(filename, String)
open(filename, "w") do io
write(io, "```@meta\nEditURL = \"$url\"\n```\n\n")
write(io, contents)
return
end
return
end

_add_edit_url(joinpath(@__DIR__, "src", "release_notes.md"), "changelog.md")

# ==============================================================================
# Build and deploy the documentation
# ==============================================================================

Documenter.makedocs(;
modules = [ParametricOptInterface],
clean = true,
Expand All @@ -17,7 +76,12 @@ Documenter.makedocs(;
),
sitename = "ParametricOptInterface.jl",
authors = "Tomás Gutierrez, and contributors",
pages = ["Home" => "index.md", "background.md", "reference.md"],
pages = [
"Home" => "index.md",
"background.md",
"reference.md",
"release_notes.md",
],
checkdocs = :none,
)

Expand Down
73 changes: 73 additions & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
```@meta
CurrentModule = ParametricOptInterface
```

# Release notes

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Version 0.15.0 (February 19, 2026)

This breaking release removes a number of ParametricOptInterface-specific
features in favor of the officially supported MathOptInterface functions for
dealing with parameters.

### Breaking

- Removed `QuadraticObjectiveCoef` (#213)

This breaking change removed `QuadraticObjectiveCoef` and all related
functions.

To represent a parameter multiplied by a quadratic term, you must now use
`MOI.ScalarNonlinearFunction` to define a cubic polynomial:
```julia
using JuMP, HiGHS
import ParametricOptInterface as POI
model = Model(() -> POI.Optimizer(HiGHS.Ootimizer))
@variable(model, x)
@variable(model, p in Parameter(1))
@objective(model, Min, p * x^2)
```

- Removed `ParameterValue` and `ParameterDual` (#219)

This breaking change removed `ParameterValue` and `ParameterDual` and all
related functions.

In JuMP, follow these replacements:
```julia
using JuMP
model = Model()
@variable(model, x)
@variable(model, p in Parameter(1))
# Replace MOI.get(model, POI.ParameterValue(), p) with
p_value = parameter_value(p)
# Replace MOI.set(model, POI.ParameterValue(), p, 2.0) with
set_parameter_value(p, 2.0)
# Replace MOI.get(model, POI.ParameterDual(), p) with
p_dual = dual(ParameterRef(p))
```

In MathOptInterface, follow these replacements:
```julia
import MathOptInterface as MOI
model = MOI.Utilities.Model{Float64}()
p, cp in MOI.add_constrained_variable(model, MOI.Parameter(1.0))
# Replace MOI.get(model, POI.ParameterValue(), p) with
p_value = MOI.get(model, MOI.ConstraintSet(), cp).value
# Replace MOI.set(model, POI.ParameterValue(), p, 2.0) with
MOI.set(model, MOI.ConstraintSet(), cp, MOI.Parameter(2.0))
# Replace MOI.get(model, POI.ParameterDual(), p) with
p_dual = MOI.get(model, MOI.ConstraintDual(), cp)
```

### Other

- Various changes to improve code style (#214)
- Make all of the test optimizers silent (#215)
- Update tests for SCS.jl@2 (#216)
- Make the explanation a separate page (#217)
- Increase coverage (#218)
- Run the benchmarks in CI to ensure they stay updated (#220)
Loading