Skip to content

Commit 2be1c9b

Browse files
authored
[docs] some more vale fixes (#2404)
1 parent 77555b3 commit 2be1c9b

Some content is hidden

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

57 files changed

+141
-115
lines changed

.vale.ini

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,30 @@ BasedOnStyles = Vale, Google
88

99
# TODO(odow): fix all of these
1010
Google.Ellipses = OFF
11-
Google.Exclamation = OFF
1211
Google.FirstPerson = OFF
1312
Google.OptionalPlurals = OFF
1413
Google.Units = OFF
1514
Vale.Spelling = OFF
15+
Google.Quotes = OFF
1616

1717
[*.md]
1818
BasedOnStyles = Vale, Google
1919

2020
[*]
21-
TokenIgnores = (\$.+?\$), \]\(@(ref|id).+?\)
22-
Google.Quotes = OFF
21+
TokenIgnores = (\$+.+?\$+)|(\]\(@(ref|id).+?\))
22+
23+
# TODO(odow): investigate
24+
25+
[docs/src/submodules/Bridges/implementation.md]
26+
Vale.Spelling = OFF
27+
28+
[docs/src/submodules/Utilities/overview.md]
29+
Vale.Spelling = OFF
30+
31+
[src/FileFormats/NL/README.md]
32+
Google.FirstPerson = NO
33+
34+
# Okay to ignore
35+
36+
[LICENSE.md]
37+
Google.Quotes = NO

docs/styles/config/vocabularies/JuMP/accept.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
% Julia-related vocab
22
api|API
3+
[Aa]rgs
4+
attr
5+
kwargs
36
arXiv
47
backports
58
blogposts
@@ -14,10 +17,14 @@ getters
1417
[Jj]ulia
1518
linkcheck
1619
nonlinearly
20+
nonzeros
1721
[Pp]recompil(ation|(e(?d)))
22+
Stacktrace
1823
subexpression(?s)
1924
sublicense
25+
supertype
2026
textualist
27+
untyped
2128

2229
% JuMP-related vocab
2330
[Cc]anonicaliz(e|ation|ing)
@@ -29,10 +36,15 @@ Presolve
2936
[Ss]emidefinite
3037
unboundedness
3138
[Un]nivariate
39+
unary
3240

3341
% Other
42+
Alizadeh
43+
Arkadi
44+
Cholesky
3445
Codecov
3546
Clp
47+
Goldfarb
3648
Gurobi
3749
GZip
3850
Holy
@@ -41,3 +53,4 @@ MOI
4153
PATHSolver
4254
preprint
4355
Lubin
56+
Nemirovski

src/Bridges/Constraint/bridges/geomean.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct GeoMeanBridge{T,F,G,H} <: AbstractBridge
6161
xij::Vector{MOI.VariableIndex}
6262
t_upper_bound_constraint::MOI.ConstraintIndex{F,MOI.LessThan{T}}
6363
rsoc_constraints::Vector{MOI.ConstraintIndex{G,MOI.RotatedSecondOrderCone}}
64-
# Ihe case that `d > 2`, this is `Nothing` because the new variables are
64+
# In the case that `d > 2`, this is `Nothing` because the new variables are
6565
# non-negative due to the RotatedSecondOrderCone constraint.
6666
x_nonnegative_constraint::Union{
6767
Nothing,

src/Bridges/Constraint/bridges/indicator_sos.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function bridge_constraint(
5252
sos_index = MOI.add_constraint(
5353
model,
5454
MOI.VectorOfVariables([slack, z]),
55-
MOI.SOS1{T}([0.4, 0.6]), # This weight vector is arbitrary!
55+
MOI.SOS1{T}([0.4, 0.6]), # This weight vector is arbitrary
5656
)
5757
new_f = MOI.Utilities.operate(+, T, f_scalars[2], slack)
5858
affine_index = MOI.add_constraint(model, new_f, s.set)

src/Bridges/Constraint/bridges/quad_to_soc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ end
346346
# where Q = U^T * U$, we have `x = U * z` and `s = -a^T z - b` hence, we have
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
349-
# to the lagrangian function of both the quadratic and RotatedSOC formulation
349+
# to the Lagrangian function of both the quadratic and RotatedSOC formulation
350350
# is exactly the same.
351351
function MOI.get(
352352
model::MOI.ModelLike,

src/Bridges/Constraint/bridges/set_dot_scaling.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ end
9393
# scalar product for the scaled PSD cone is `<x, y>_2 = x'y` but the scalar
9494
# product for the PSD cone additionally scales the offdiagonal entries by `2`
9595
# hence by `D^2` so `<x, y>_1 = x'D^2y`.
96-
# So `<Dx, y>_2 = <x, D^(-1)y>_1` hence the adjoint of `D` is its inverse!
96+
# So `<Dx, y>_2 = <x, D^(-1)y>_1` hence the adjoint of `D` is its inverse.
9797
function MOI.Bridges.adjoint_map_function(
9898
::Type{<:SetDotScalingBridge{T,S}},
9999
func,

src/Bridges/Constraint/bridges/slack.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function MOI.set(
141141
# As the slack appears `+slack` in `slack_in_set` and `-slack` in equality,
142142
# giving `value` to both will cancel it out in the Lagrangian.
143143
# Giving `value` to `bridge.equality` will put the function in the
144-
# lagrangian as expected.
144+
# Lagrangian as expected.
145145
MOI.set(model, attr, bridge.slack_in_set, value)
146146
MOI.set(model, attr, bridge.equality, value)
147147
return

src/Bridges/Variable/bridges/rsoc_to_psd.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
``Y = \\left[\\begin{array}{c c}t & x^\\top \\\\ x & 2u \\mathbf{I}\\end{array}\\right].``
1515
1616
Additional bounds are added to ensure the off-diagonals of the ``2uI`` submatrix
17-
are `0`, and linear constraints are added to ennsure the diagonal of ``2uI``
17+
are `0`, and linear constraints are added to ensure the diagonal of ``2uI``
1818
takes the same values.
1919
2020
As a special case, if ``|x|| = 0``, then `RSOCtoPSDBridge` reformulates into
@@ -36,7 +36,7 @@ As a special case, if ``|x|| = 0``, then `RSOCtoPSDBridge` reformulates into
3636
* [`MOI.VectorOfVariables`](@ref) in
3737
[`MOI.PositiveSemidefiniteConeTriangle`](@ref) otherwise
3838
* The constraint node [`MOI.VariableIndex`](@ref) in [`MOI.EqualTo`](@ref)
39-
* The constrant node [`MOI.ScalarAffineFunction`](@ref) in [`MOI.EqualTo`](@ref)
39+
* The constant node [`MOI.ScalarAffineFunction`](@ref) in [`MOI.EqualTo`](@ref)
4040
"""
4141
struct RSOCtoPSDBridge{T} <: AbstractBridge
4242
variables::Vector{MOI.VariableIndex}

src/Bridges/Variable/bridges/vectorize.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function MOI.set(
124124
bridge::VectorizeBridge,
125125
::MOI.Utilities.ScalarLinearSet,
126126
)
127-
# This would require modifing any constraint which uses the bridged
127+
# This would require modifying any constraint which uses the bridged
128128
# variable.
129129
return throw(
130130
MOI.SetAttributeNotAllowed(

src/Bridges/bridge.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ needs_final_touch(::AbstractBridge) = false
274274
final_touch(bridge::AbstractBridge, model::MOI.ModelLike)::Nothing
275275
276276
A function that is called immediately prior to [`MOI.optimize!`](@ref) to allow
277-
bridges to modify their reformulations with repsect to other variables and
277+
bridges to modify their reformulations with respect to other variables and
278278
constraints in `model`.
279279
280280
For example, if the correctness of `bridge` depends on the bounds of a variable

0 commit comments

Comments
 (0)