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

0 commit comments

Comments
 (0)