Skip to content

Commit

Permalink
[docs] update to vale.sh v3.3.1 (#3722)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Apr 8, 2024
1 parent 617f961 commit 05d4876
Show file tree
Hide file tree
Showing 44 changed files with 157 additions and 143 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Help us track down bugs in JuMP

---

Welcome to JuMP!
Welcome.

Please read the following before posting a new bug report:

- If you have a question or are unsure if the behavior you're experiencing is a bug, please search or post to our Discourse site: https://discourse.julialang.org/c/domain/opt. Questions posted to Discourse have broader visibility and are likely to be answered more quickly than issues filed here.

- If you're experiencing a bug that is solver-specific (e.g., it only happens when you use Gurobi), the issue is best raised at the relevant solver-wrapper repository (e.g., Gurobi.jl). If you are unsure, you should raise the problem on Discourse first.
- If you're experiencing a bug that is solver-specific (for example, it only happens when you use Gurobi), the issue is best raised at the relevant solver-wrapper repository (for example, Gurobi.jl). If you are unsure, you should raise the problem on Discourse first.

- If you are reasonably confident your issue is a bug in JuMP, this is the right place. Be sure to include as much relevant information as possible, including a minimal reproducible example. See https://help.github.com/articles/basic-writing-and-formatting-syntax/ for background on how to format text and code on GitHub issues.

Thanks for contributing to JuMP!
Thanks for contributing to JuMP.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ about: Suggest an idea for JuMP

---

Welcome to JuMP! You can use this Github issue to suggest a new feature for JuMP.
Welcome. Use this GitHub issue to suggest a new feature for JuMP.

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
A clear and concise description of what the problem is.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
Expand All @@ -18,4 +18,4 @@ A clear and concise description of any alternative solutions or features you've
**Additional context**
Add any other context or screenshots about the feature request here.

Thanks for contributing to JuMP!
Thanks for contributing to JuMP.
6 changes: 3 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
path: ${{ github.workspace }}/latex-debug-logs
- uses: errata-ai/vale-action@reviewdog
with:
version: 2.30.0
files: docs/src
version: 3.3.1
files: all
fail_on_error: true
filter_mode: nofilter
vale_flags: "--config=docs/.vale.ini"
vale_flags: "--config=.vale.ini"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
23 changes: 21 additions & 2 deletions docs/.vale.ini → .vale.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
StylesPath = styles
StylesPath = docs/styles
MinAlertLevel = warning

Vocab = JuMP-Vocab
Vocab = JuMP

[*.md]
BasedOnStyles = Vale, Google
Expand All @@ -10,13 +10,32 @@ TokenIgnores = \
\]\(@(ref|id).+?\), \
AMPL: A Modeling Language for Mathematical Programming

[*.jl]
BasedOnStyles = Vale, Google

# TODO(odow): fix all of these
Google.Ellipses = OFF
Google.Exclamation = OFF
Google.FirstPerson = OFF
Google.OptionalPlurals = OFF
Google.Quotes = OFF
Google.Units = OFF
Vale.Spelling = OFF
Vale.Terms = OFF

; TODO(odow): remove at some point
[docs/src/packages/Clarabel.md]
Google.Latin = NO

[docs/src/packages/EAGO.md]
Google.Periods = NO

[docs/src/packages/Ipopt.md]
Google.Colons = NO

[docs/src/packages/Loraine.md]
Google.Ellipses = NO

[docs/src/packages/Manopt.md]
Google.Exclamation = NO

Expand Down
17 changes: 8 additions & 9 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
# JuMP community standards

Welcome! JuMP is part of the Julia community, and we uphold its [community
Welcome. JuMP is part of the Julia community, and we uphold its [community
standards](https://julialang.org/community/standards/). We repeat the key points
below with some minor specializations for JuMP.

The JuMP community is committed to maintaining a welcoming, civil, and
constructive environment. We expect the following standards to be observed and
upheld by all participants in any community forum (Discourse, GitHub, gitter,
etc.).
upheld by all participants in any community forum (Discourse, GitHub, etc.).

## Be respectful and inclusive.
## Be respectful and inclusive

Please do not use overtly sexual language or imagery, and do not attack anyone
based on any aspect of personal identity, including gender, sexuality, religion,
ethnicity, race, age or ability. Keep in mind that what you write in public
ethnicity, race, age, or ability. Keep in mind that what you write in public
forums is read by many people who don't know you personally, so please refrain
from making prejudiced or sexual jokes and commentseven ones that you might
from making prejudiced or sexual jokes and commentseven ones that you might
consider acceptable in private. Ask yourself if a comment or statement might
make someone feel unwelcomed or like an outsider.

## Give credit.
## Give credit

All participants in the JuMP community are expected to respect copyright laws
and ethical attribution standards. This applies to both code and written
materials, such as documentation or blog posts. Materials that violate the law,
are plagiaristic, or ethically dubious in some way will be removed from
officially-maintained lists of resources.
officially maintained lists of resources.

## Get involved.
## Get involved

The JuMP community is built on a foundation of reciprocity and collaboration. Be
aware that most community members contribute on a voluntary basis, so ideas and
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ visiting [jump.dev](https://jump.dev).

| | Latest release | Development version |
| :------ | :------------------ | :------------------------- |
| Tagged version | [![version](https://juliahub.com/docs/General/JuMP/stable/version.svg)](https://juliahub.com/ui/Packages/General/JuMP) [![deps](https://juliahub.com/docs/JuMP/deps.svg)](https://juliahub.com/ui/Packages/JuMP/DmXqY?t=2) | |
| Tagged version | [![version](https://juliahub.com/docs/General/JuMP/stable/version.svg)](https://juliahub.com/ui/Packages/General/JuMP) [![JuliaHub](https://juliahub.com/docs/JuMP/deps.svg)](https://juliahub.com/ui/Packages/JuMP/DmXqY?t=2) | |
| Install | `import Pkg; Pkg.add("JuMP")` | `import Pkg; Pkg.pkg"add JuMP#master"` |
| Documentation | [![stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://jump.dev/JuMP.jl/stable/) | [![dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://jump.dev/JuMP.jl/dev/) |
| Get help | Ask a question on the [Community forum](https://jump.dev/forum) | Join the [Developer chatroom](https://jump.dev/chatroom) |
Expand All @@ -27,7 +27,7 @@ describes the best practices for asking a question.

## Bug reports

Please report any issues via the Github [issue tracker]. All types of issues
Please report any issues via the GitHub [issue tracker]. All types of issues
are welcome and encouraged; this includes bug reports, documentation typos,
feature requests, etc.

Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ JuMP's documentation is written with [Documenter.jl](https://github.com/JuliaDoc
## Initial setup

To build the documentation, you need to do a series of initialization steps.
However, you only need to do this once!
However, you only need to do this once.

First, you will need a local copy of JuMP. If you don't have one already, run:
```
Expand Down Expand Up @@ -41,7 +41,7 @@ The compiled documents can be viewed at `~/.julia/dev/JuMP/docs/build/index.html
## Updating Project.toml

Project.toml fixes the versions of JuMP-related packages such as MOI and the
solvers. This is to prevent minor changes in the upstream solvers (e.g.,
solvers. This is to prevent minor changes in the upstream solvers (for example,
numerical differences or changes to their raw solver statuses) from causing the
documentation builds to fail on an un-related PR.

Expand All @@ -54,7 +54,7 @@ it may happen that the second pull request finishes CI before the first. Therefo
the docs from the second pull request will deploy and be updated in `/dev`. However,
when the first pull request finishes and deploys the docs, these changes will be
overwritten because they were not in the repository when the first pull request was
merged!
merged.

For an example of this, see https://github.com/jump-dev/JuMP.jl/issues/2947.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/manual/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ c : 2 x ≤ 1
julia> @constraint(model, c, 2x <= 1)
ERROR: An object of name c is already attached to this model. If this
is intended, consider using the anonymous construction syntax, e.g.,
is intended, consider using the anonymous construction syntax, for example,
`x = @variable(model, [1:N], ...)` where the name of the object does
not appear inside the macro.
Expand Down Expand Up @@ -891,7 +891,7 @@ Therefore, creating a new constraint of the same name will throw an error:
```jldoctest constraints_delete
julia> @constraint(model, con, 2x <= 1)
ERROR: An object of name con is already attached to this model. If this
is intended, consider using the anonymous construction syntax, e.g.,
is intended, consider using the anonymous construction syntax, for example,
`x = @variable(model, [1:N], ...)` where the name of the object does
not appear inside the macro.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/manual/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ x
julia> @variable(model, x)
ERROR: An object of name x is already attached to this model. If this
is intended, consider using the anonymous construction syntax, e.g.,
is intended, consider using the anonymous construction syntax, for example,
`x = @variable(model, [1:N], ...)` where the name of the object does
not appear inside the macro.
Expand Down Expand Up @@ -752,7 +752,7 @@ Therefore, creating a new variable of the same name will throw an error:
```jldoctest variables_delete
julia> @variable(model, x)
ERROR: An object of name x is already attached to this model. If this
is intended, consider using the anonymous construction syntax, e.g.,
is intended, consider using the anonymous construction syntax, for example,
`x = @variable(model, [1:N], ...)` where the name of the object does
not appear inside the macro.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/nonlinear/complementarity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ U(C) = C^ρ / ρ
MU(C) = C^- 1)
model = Model(PATHSolver.Optimizer)
set_silent(model)
@variable(model, EU, start = 1) # Expected utilitiy
@variable(model, EU, start = 1) # Expected utility
@variable(model, EV, start = 1) # Equivalent variation in income
@variable(model, C_G, start = 1) # Consumption on a good day
@variable(model, C_B, start = 1) # Consumption on a bad day
Expand Down
6 changes: 3 additions & 3 deletions docs/src/tutorials/nonlinear/operator_ad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Test.@test ≈(analytic_H, fdiff_H)
"""
fdiff_derivatives(f::Function) -> Tuple{Function,Function}
Return a tuple of functions that evalute the gradient and Hessian of `f` using
Return a tuple of functions that evaluate the gradient and Hessian of `f` using
ForwardDiff.jl.
"""
function fdiff_derivatives(f::Function)
Expand Down Expand Up @@ -260,7 +260,7 @@ function enzyme_∇²f(H::AbstractMatrix{T}, x::Vararg{T,N}) where {T,N}
## initializing with a different direction.
Enzyme.BatchDuplicated.(Enzyme.Active.(x), ntuple(direction, N))...,
)[1]
## Unpack Enzyme's `hess` data structure into the the matrix `H` expected by
## Unpack Enzyme's `hess` data structure into the matrix `H` expected by
## JuMP.
for j in 1:N, i in 1:j
H[j, i] = hess[j][i]
Expand All @@ -282,7 +282,7 @@ Test.@test ≈(analytic_H, enzyme_H)
"""
enzyme_derivatives(f::Function) -> Tuple{Function,Function}
Return a tuple of functions that evalute the gradient and Hessian of `f` using
Return a tuple of functions that evaluate the gradient and Hessian of `f` using
Enzyme.jl.
"""
function enzyme_derivatives(f::Function)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ nothing #hide
# For the best results, it is advised to experiment different linear solvers.
#
# For example, the linear solver `MA27` is outdated and can be quite slow.
# `MA57` is a much better alternative, especially for highly-sparse problems
# `MA57` is a much better alternative, especially for highly sparse problems
# (such as trajectory optimization problems).

## Uncomment the lines below to pass user options to the solver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dataframe(?s)
datastructure
destructuring
dev
discretized
discretize(d|s)
docstring(?s)
doctest(?s)
embeddable
Expand All @@ -34,6 +34,7 @@ multithreading
namespace
orthant
performant
plagiaristic
[Pp]recompil(ation|(e(?d)))
preprint
README
Expand All @@ -42,6 +43,7 @@ reimplemented
[Ss]tacktrace
subexpression(?s)
subgraph(?s)
sublicense
subtyping
sysimage
threadsafe
Expand All @@ -50,6 +52,7 @@ TODO
transpiled
unexported
[Uu]ntyped
unwelcomed
vectorize

% JuMP-related vocab
Expand Down Expand Up @@ -109,20 +112,15 @@ Adagrad
AMPL
Appveyor
Artelys
Bonmin
BONMIN
Cbc
CBC
cdd
CDD
cddlib
CDDLib
(Bonmin|BONMIN)
(Cbc|CBC)
(cdd|CDD)
(cddlib|CDDLib)
Clarabel
Clp
CPLEXLink
COSMO
(cosmo|COSMO)
COSMOAccelerators
cosmo
Couenne
Divio
Dualization
Expand All @@ -133,27 +131,24 @@ Enzyme
Geomstats
Geoopt
GLPK
Gurobi
GUROBI
(Gurobi|GUROBI)
GZip
Hypatia
Ipopt
IPOPT
(Ipopt|IPOPT)
Jax
JSONSchema
Knitro
KNITRO
(Knitro|KNITRO)
[Mm]anopt
MATLAB
MOI
Mosek
MOSEK
(Mosek|MOSEK)
Octeract
Optim
Pajarito
Pardiso
PATHSolver
Pavito
(pdf|PDF)
Penbmi
Penopt
Plasmo
Expand All @@ -163,15 +158,15 @@ Riemopt
SDPAFamily
SDPNAL
Umfpack
Xpress
XPRESS
(Xpress|XPRESS)

% People
Arpit
Baldick
Barvinok
Bertsimas
Betts
Bezanson
Bhatia
Biegler
Borchers
Expand Down Expand Up @@ -208,6 +203,7 @@ Kernighan
Kallus
Kaluba
Kapelevich
Karpinski
Krasko
Kibaek
Latorre
Expand Down
2 changes: 1 addition & 1 deletion src/Containers/DenseAxisArray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ end

# Implement a special case: If the axis is a vector of pairs, also allow tuples
# as indices. This is needed due to the behavior pairs and tuples when iterating
# through dictionaries, i.e., `x[(k, v) in d]` gets added as `x[k => v]`, even
# through dictionaries, that is, `x[(k, v) in d]` gets added as `x[k => v]`, even
# though it looks to the user like they were tuples.

function Base.getindex(
Expand Down
Loading

0 comments on commit 05d4876

Please sign in to comment.