Skip to content

Commit 77555b3

Browse files
authored
[docs] update vale to v3.0.5 (#2403)
1 parent 57f09df commit 77555b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+164
-150
lines changed

.github/workflows/documentation.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ jobs:
3333
path: ${{ github.workspace }}/latex-debug-logs
3434
- uses: errata-ai/vale-action@reviewdog
3535
with:
36-
# TODO(odow): at some point, update to vale@3
37-
version: 2.30.0
38-
files: docs/src
36+
version: 3.0.5
37+
files: all
3938
fail_on_error: true
4039
filter_mode: nofilter
41-
vale_flags: "--config=docs/.vale.ini"
40+
vale_flags: "--config=.vale.ini"
4241
env:
4342
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.vale.ini

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
StylesPath = docs/styles
2+
MinAlertLevel = warning
3+
4+
Vocab = JuMP
5+
6+
[*.jl]
7+
BasedOnStyles = Vale, Google
8+
9+
# TODO(odow): fix all of these
10+
Google.Ellipses = OFF
11+
Google.Exclamation = OFF
12+
Google.FirstPerson = OFF
13+
Google.OptionalPlurals = OFF
14+
Google.Units = OFF
15+
Vale.Spelling = OFF
16+
17+
[*.md]
18+
BasedOnStyles = Vale, Google
19+
20+
[*]
21+
TokenIgnores = (\$.+?\$), \]\(@(ref|id).+?\)
22+
Google.Quotes = OFF

docs/.vale.ini

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/make.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ write(joinpath(@__DIR__, "src", "MathOptInterface.pdf"), "")
149149
linkcheck_ignore = [
150150
# Ignore the PDF link, because it hasn't been built yet.
151151
"MathOptInterface.pdf",
152-
# Ignore tags, because preping for a new release will otherwise cause it
153-
# to fail.
152+
# Ignore tags, because prepping for a new release will otherwise cause
153+
# it to fail.
154154
r"https://github.com/jump-dev/MathOptInterface.jl/releases/tag/v([0-9]).([0-9]+).([0-9]+)",
155155
# Ignore issue and pull request links, because there are many of them,
156156
# and they sometimes time-out the linkcheck.
@@ -178,8 +178,8 @@ if _PDF
178178
build = "latex_build",
179179
pages = _PAGES,
180180
)
181-
# Hack for deploying: copy the pdf (and only the PDF) into the HTML build
182-
# directory! We don't want to copy everything in `latex_build` because it
181+
# Hack for deploying: copy the PDF (and only the PDF) into the HTML build
182+
# directory. We don't want to copy everything in `latex_build` because it
183183
# includes lots of extraneous LaTeX files.
184184
cp(
185185
joinpath(@__DIR__, "latex_build", "MathOptInterface.pdf"),

docs/styles/Vocab/JuMP-Vocab/accept.txt renamed to docs/styles/config/vocabularies/JuMP/accept.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ bugfixe(?s)
77
datastructure
88
docstring(?s)
99
doctest
10-
enum
10+
[Ee]num
1111
errored
1212
flamegraph
1313
getters
1414
[Jj]ulia
15+
linkcheck
16+
nonlinearly
1517
[Pp]recompil(ation|(e(?d)))
1618
subexpression(?s)
19+
sublicense
20+
textualist
1721

1822
% JuMP-related vocab
1923
[Cc]anonicaliz(e|ation|ing)
@@ -27,6 +31,7 @@ unboundedness
2731
[Un]nivariate
2832

2933
% Other
34+
Codecov
3035
Clp
3136
Gurobi
3237
GZip
@@ -35,3 +40,4 @@ JSONSchema
3540
MOI
3641
PATHSolver
3742
preprint
43+
Lubin

src/Bridges/Bridges.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ uses a limited set of bridges that are:
7575
2. generally applicable for all optimizers.
7676
7777
For some optimizers however, it is useful to add additional bridges, such as
78-
those that are implemented in external packages (e.g., within the solver package
79-
itself) or only apply in certain circumstances (e.g.,
78+
those that are implemented in external packages (for example, within the solver package
79+
itself) or only apply in certain circumstances (for example,
8080
[`Constraint.SOCtoNonConvexQuadBridge`](@ref)).
8181
8282
Such optimizers should implement the `ListOfNonstandardBridges` attribute to
@@ -108,7 +108,7 @@ end
108108
109109
### An optimizer defining an internal bridge
110110
111-
Suppose an optimizer can exploit specific structure of a constraint, e.g., it
111+
Suppose an optimizer can exploit specific structure of a constraint, for example, it
112112
can exploit the structure of the matrix `A` in the linear system of equations
113113
`A * x = b`.
114114

src/Bridges/Constraint/bridges/ltgt_to_interval.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ An abstract type that simplifies the creation of other bridges.
1111
1212
!!! warning
1313
`T` must be a `AbstractFloat` type because otherwise `typemin` and `typemax`
14-
would either be not implemented (e.g. `BigInt`), or would not give infinite
15-
value (e.g. `Int`). For this reason, this bridge is only added to
14+
would either be not implemented (for example, `BigInt`), or would not give infinite
15+
value (for example, `Int`). For this reason, this bridge is only added to
1616
[`MOI.Bridges.full_bridge_optimizer`](@ref) when `T` is a subtype of
1717
`AbstractFloat`.
1818
"""

src/Bridges/Constraint/bridges/quad_to_soc.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function bridge_constraint(
8181
"Unable to transform a quadratic constraint into a " *
8282
"second-order cone constraint because the quadratic " *
8383
"constraint is not strongly convex.\n\nConvex constraints " *
84-
"that are not strongly convex (i.e., the matrix is positive " *
84+
"that are not strongly convex (that is, the matrix is positive " *
8585
"semidefinite but not positive definite) are not supported " *
8686
"yet.\n\nNote that a quadratic equality constraint is " *
8787
"non-convex.",
@@ -347,7 +347,7 @@ end
347347
# = -u * (z^T Q z/2 + a^T z + b)
348348
# So the dual of the quadratic constraint is `-u`, so that the contribution
349349
# to the lagrangian function of both the quadratic and RotatedSOC formulation
350-
# is exactly the same. Q.E.D.
350+
# is exactly the same.
351351
function MOI.get(
352352
model::MOI.ModelLike,
353353
attr::Union{MOI.ConstraintDual,MOI.ConstraintDualStart},

src/Bridges/Constraint/map.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ end
175175
"""
176176
keys_of_type(map::Map, C::Type{<:MOI.ConstraintIndex})
177177
178-
Return a list of all the keys of type `C` in `map` in order order in which they
178+
Return a list of all the keys of type `C` in `map` in order in which they
179179
were created with `add_key_for_bridge`.
180180
"""
181181
function keys_of_type(map::Map, C::Type{MOI.ConstraintIndex{F,S}}) where {F,S}

src/Bridges/Variable/map.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ Record that a constraint `vi`-in-`set` is added and throws if a lower or upper b
288288
is set by this constraint and such bound has already been set for `vi`.
289289
"""
290290
function MOI.add_constraint(::Map, ::MOI.VariableIndex, ::MOI.AbstractScalarSet)
291-
# Nothing to do as this is is not recognized as setting a lower or upper bound
291+
# Nothing to do as this is not recognized as setting a lower or upper bound
292292
end
293293

294294
# We cannot use `SUPPORTED_VARIABLE_SCALAR_SETS` because
@@ -327,7 +327,7 @@ function MOI.delete(
327327
::Map,
328328
ci::MOI.ConstraintIndex{MOI.VariableIndex,<:MOI.AbstractScalarSet},
329329
)
330-
# Nothing to do as this is is not recognized as setting a lower or upper bound
330+
# Nothing to do as this is not recognized as setting a lower or upper bound
331331
end
332332

333333
function MOI.delete(
@@ -581,7 +581,7 @@ function throw_if_cannot_unbridge(map::Map)
581581
if map.unbridged_function === nothing
582582
error(
583583
"Cannot unbridge function because some variables are bridged by",
584-
" variable bridges that do not support reverse mapping, e.g.,",
584+
" variable bridges that do not support reverse mapping, for example,",
585585
" `ZerosBridge`.",
586586
)
587587
end

src/Bridges/bridge_optimizer.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ function MOI.supports(
15341534
if is_bridged(b, S)
15351535
# If S needs to be bridged, it usually means that either there is a
15361536
# variable bridge, or that there is a free variable followed by a
1537-
# constraint bridge (i.e., the two cases handled below).
1537+
# constraint bridge (that is, the two cases handled below).
15381538
#
15391539
# However, it might be the case, like the tests in
15401540
# Variable/flip_sign.jl, that the model supports F-in-S constraints,
@@ -2216,7 +2216,7 @@ function bridged_function(b::AbstractBridgeOptimizer, func::MOI.VariableIndex)
22162216
# Should not be called by `add_constraint` as it force-bridges it
22172217
# but could be called by attributes
22182218
if is_bridged(b, func)
2219-
# It could be solved by force-bridging the attribues (e.g. objective).
2219+
# It could be solved by force-bridging the attribues (for example, objective).
22202220
error("Using bridged variable in `VariableIndex` function.")
22212221
end
22222222
return func
@@ -2349,7 +2349,7 @@ function unbridged_constraint_function end
23492349

23502350
# The purpose of unbridged_constraint_function is to convert the result of
23512351
# ConstraintFunction into the un-bridged form. Since variable bridges create
2352-
# substitution rules which are scalar functions, e.g., `x => y_1 - y_2`, if the
2352+
# substitution rules which are scalar functions, for example, `x => y_1 - y_2`, if the
23532353
# result is a VariableIndex or an AbstractVectorFunction we can return the
23542354
# unbridged function:
23552355

src/Bridges/debug.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ The number inside each pair of brackets is an index of the node in the
9494
hyper-graph.
9595
9696
Note that this hyper-graph is the full list of possible transformations. When
97-
the bridged model is created, we select the shortest hyper-path(s) from this
97+
the bridged model is created, we select the shortest hyper-path from this
9898
graph, so many nodes may be un-used.
9999
100100
To see which nodes are used, call [`print_active_bridges`](@ref).
101101
102102
For more information, see Legat, B., Dowson, O., Garcia, J., and Lubin, M.
103103
(2020). "MathOptInterface: a data structure for mathematical optimization
104-
problems." URL: [https://arxiv.org/abs/2002.03447](https://arxiv.org/abs/2002.03447)
104+
problems." [URL](https://arXiv.org/abs/2002.03447)
105105
"""
106106
function print_graph(io::IO, b::LazyBridgeOptimizer; kwargs...)
107107
println(io, b.graph)

src/FileFormats/LP/LP.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import MathOptInterface as MOI
1212
# Julia 1.6 removes Grisu from Base. Previously, we went
1313
# _print_shortest(io, x) = Base.Grisu.print_shortest(io, x)
1414
# To avoid adding Grisu as a dependency, use the following printing heuristic.
15-
# TODO(odow): consider printing 1.0 as 1.0 instead of 1, i.e., without the
15+
# TODO(odow): consider printing 1.0 as 1.0 instead of 1, that is, without the
1616
# rounding branch.
1717
function _print_shortest(io::IO, x::Float64)
1818
if x == -Inf

src/FileFormats/MOF/mof.schema.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
}
427427
}
428428
}, {
429-
"description": "The function `0.5x'Qx + a'x + b`, where `a` is a sparse vector of `ScalarAffineTerm`s in `affine_terms`, `b` is the scalar `constant`, and `Q` is a symmetric matrix specified by a list of `ScalarQuadraticTerm`s in `quadratic_terms`. Duplicate indices in `affine_terms` and `quadratic` are accepted, and the corresponding coefficients are summed together. Mirrored indices in `quadratic_terms` (i.e., `(i,j)` and `(j, i)`) are considered duplicates; only one need to be specified.",
429+
"description": "The function `0.5x'Qx + a'x + b`, where `a` is a sparse vector of `ScalarAffineTerm`s in `affine_terms`, `b` is the scalar `constant`, and `Q` is a symmetric matrix specified by a list of `ScalarQuadraticTerm`s in `quadratic_terms`. Duplicate indices in `affine_terms` and `quadratic` are accepted, and the corresponding coefficients are summed together. Mirrored indices in `quadratic_terms` (that is, `(i,j)` and `(j, i)`) are considered duplicates; only one need to be specified.",
430430
"examples": ["{\"type\": \"ScalarQuadraticFunction\", \"constant\": 1.0, \"affine_terms\": [{\"coefficient\": 2.5, \"variable\": \"x\"}], \"quadratic_terms\": [{\"coefficient\": 2.0, \"variable_1\": \"x\", \"variable_2\": \"y\"}]}"],
431431
"required": ["constant", "affine_terms", "quadratic_terms"],
432432
"properties": {
@@ -813,7 +813,7 @@
813813
}
814814
}
815815
}, {
816-
"description": "{[t, X] ∈ R^{1 + d(d+1)/2} : t ≤ det(X)^{1/d}}, where the matrix `X` is represented in the same symmetric packed format as in the `PositiveSemidefiniteConeTriangle`. The argument `side_dimension` is the side dimension of the matrix `X`, i.e., its number of rows or columns.",
816+
"description": "{[t, X] ∈ R^{1 + d(d+1)/2} : t ≤ det(X)^{1/d}}, where the matrix `X` is represented in the same symmetric packed format as in the `PositiveSemidefiniteConeTriangle`. The argument `side_dimension` is the side dimension of the matrix `X`, that is, its number of rows or columns.",
817817
"examples": ["{\"type\": \"RootDetConeTriangle\", \"side_dimension\": 2}"],
818818
"required": ["side_dimension"],
819819
"properties": {
@@ -826,7 +826,7 @@
826826
}
827827
}
828828
}, {
829-
"description": "{[t, X] ∈ R^{1 + d^2} : t ≤ det(X)^{1/d}, X symmetric}, where the matrix `X` is represented in the same symmetric packed format as in the `PositiveSemidefiniteConeSquare`. The argument `side_dimension` is the side dimension of the matrix `X`, i.e., its number of rows or columns.",
829+
"description": "{[t, X] ∈ R^{1 + d^2} : t ≤ det(X)^{1/d}, X symmetric}, where the matrix `X` is represented in the same symmetric packed format as in the `PositiveSemidefiniteConeSquare`. The argument `side_dimension` is the side dimension of the matrix `X`, that is, its number of rows or columns.",
830830
"examples": ["{\"type\": \"RootDetConeSquare\", \"side_dimension\": 2}"],
831831
"required": ["side_dimension"],
832832
"properties": {
@@ -839,7 +839,7 @@
839839
}
840840
}
841841
}, {
842-
"description": "{[t, u, X] ∈ R^{2 + d(d+1)/2} : t ≤ u log(det(X/u)), u > 0}, where the matrix `X` is represented in the same symmetric packed format as in the `PositiveSemidefiniteConeTriangle`. The argument `side_dimension` is the side dimension of the matrix `X`, i.e., its number of rows or columns.",
842+
"description": "{[t, u, X] ∈ R^{2 + d(d+1)/2} : t ≤ u log(det(X/u)), u > 0}, where the matrix `X` is represented in the same symmetric packed format as in the `PositiveSemidefiniteConeTriangle`. The argument `side_dimension` is the side dimension of the matrix `X`, that is, its number of rows or columns.",
843843
"examples": ["{\"type\": \"LogDetConeTriangle\", \"side_dimension\": 2}"],
844844
"required": ["side_dimension"],
845845
"properties": {
@@ -852,7 +852,7 @@
852852
}
853853
}
854854
}, {
855-
"description": "{[t, u, X] ∈ R^{2 + d^2} : t ≤ u log(det(X/u)), X symmetric, u > 0}, where the matrix `X` is represented in the same symmetric packed format as in the `PositiveSemidefiniteConeSquare`. The argument `side_dimension` is the side dimension of the matrix `X`, i.e., its number of rows or columns.",
855+
"description": "{[t, u, X] ∈ R^{2 + d^2} : t ≤ u log(det(X/u)), X symmetric, u > 0}, where the matrix `X` is represented in the same symmetric packed format as in the `PositiveSemidefiniteConeSquare`. The argument `side_dimension` is the side dimension of the matrix `X`, that is, its number of rows or columns.",
856856
"examples": ["{\"type\": \"LogDetConeSquare\", \"side_dimension\": 2}"],
857857
"required": ["side_dimension"],
858858
"properties": {
@@ -1019,7 +1019,7 @@
10191019
}
10201020
}
10211021
}, {
1022-
"description": "The set corresponding to a mixed complementarity constraint. Complementarity constraints should be specified with an AbstractVectorFunction-in-Complements(dimension) constraint. The dimension of the vector-valued function `F` must be `dimension`. This defines a complementarity constraint between the scalar function `F[i]` and the variable in `F[i + dimension/2]`. Thus, `F[i + dimension/2]` must be interpretable as a single variable `x_i` (e.g., `1.0 * x + 0.0`). The mixed complementarity problem consists of finding `x_i` in the interval `[lb, ub]` (i.e., in the set `Interval(lb, ub)`), such that the following holds: 1. `F_i(x) == 0` if `lb_i < x_i < ub_i`; 2. `F_i(x) >= 0` if `lb_i == x_i`; 3. `F_i(x) <= 0` if `x_i == ub_i`. Classically, the bounding set for `x_i` is `Interval(0, Inf)`, which recovers: `0 <= F_i(x) ⟂ x_i >= 0`, where the `⟂` operator implies `F_i(x) * x_i = 0`.",
1022+
"description": "The set corresponding to a mixed complementarity constraint. Complementarity constraints should be specified with an AbstractVectorFunction-in-Complements(dimension) constraint. The dimension of the vector-valued function `F` must be `dimension`. This defines a complementarity constraint between the scalar function `F[i]` and the variable in `F[i + dimension/2]`. Thus, `F[i + dimension/2]` must be interpretable as a single variable `x_i` (for example, `1.0 * x + 0.0`). The mixed complementarity problem consists of finding `x_i` in the interval `[lb, ub]` (that is, in the set `Interval(lb, ub)`), such that the following holds: 1. `F_i(x) == 0` if `lb_i < x_i < ub_i`; 2. `F_i(x) >= 0` if `lb_i == x_i`; 3. `F_i(x) <= 0` if `x_i == ub_i`. Classically, the bounding set for `x_i` is `Interval(0, Inf)`, which recovers: `0 <= F_i(x) ⟂ x_i >= 0`, where the `⟂` operator implies `F_i(x) * x_i = 0`.",
10231023
"examples": ["{\"type\": \"Complements\", \"dimension\": 2}"],
10241024
"required": ["dimension"],
10251025
"properties": {

src/FileFormats/MPS/MPS.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import MathOptInterface as MOI
1313
# Julia 1.6 removes Grisu from Base. Previously, we went
1414
# print_shortest(io, x) = Base.Grisu.print_shortest(io, x)
1515
# To avoid adding Grisu as a dependency, use the following printing heuristic.
16-
# TODO(odow): consider printing 1.0 as 1.0 instead of 1, i.e., without the
16+
# TODO(odow): consider printing 1.0 as 1.0 instead of 1, that is, without the
1717
# rounding branch.
1818
function print_shortest(io::IO, x::Real)
1919
if isinteger(x) && (typemin(Int) <= x <= typemax(Int))
@@ -918,16 +918,12 @@ end
918918
# type name
919919
# COLUMNS
920920
# column row value row value
921-
# name name name
922921
# RHS
923922
# rhs row value row value
924-
# name name name
925923
# RANGES
926924
# range row value row value
927-
# name name name
928925
# BOUNDS
929926
# type bound column value
930-
# name name
931927
# SOS
932928
# type CaseName SOSName SOSpriority
933929
# CaseName VarName1 VarWeight1
@@ -1028,7 +1024,7 @@ end
10281024
HEADER_INDICATORS,
10291025
)
10301026

1031-
# Headers(s) gets called _alot_ (on every line), so we try very hard to be
1027+
# `Headers(s)` gets called _alot_ (on every line), so we try very hard to be
10321028
# efficient.
10331029
function Headers(s::AbstractString)
10341030
N = length(s)
@@ -1618,7 +1614,7 @@ function _parse_single_bound(
16181614
elseif bound_type == "FR"
16191615
# So even though FR bounds should be of the form:
16201616
# FR BOUND1 VARNAME
1621-
# there are cases in MIPLIB2017 (e.g., leo1 and leo2) like so:
1617+
# there are cases in MIPLIB2017 (for example, leo1 and leo2) like so:
16221618
# FR BOUND1 C0000001 .000000
16231619
# In these situations, just ignore the value.
16241620
data.col_lower[col] = -Inf

src/FileFormats/NL/NL.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ function Base.write(io::IO, model::Model)
635635

636636
# Line 10: common exprs: b,c,o,c1,o1
637637
# Notes:
638-
# * We don't add common subexpressions (i.e., V blocks).
638+
# * We don't add common subexpressions (that is, V blocks).
639639
# * I assume the notation means
640640
# - b = in nonlinear objective and constraint
641641
# - c = in nonlinear constraint

0 commit comments

Comments
 (0)