Skip to content

Commit 8ca9f32

Browse files
authored
Use import MathOptInterface as MOI (#2096)
1 parent 66a220f commit 8ca9f32

186 files changed

Lines changed: 538 additions & 838 deletions

File tree

Some content is hidden

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

docs/src/background/duality.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
```@meta
22
CurrentModule = MathOptInterface
33
DocTestSetup = quote
4-
using MathOptInterface
5-
const MOI = MathOptInterface
4+
import MathOptInterface as MOI
65
end
76
DocTestFilters = [r"MathOptInterface|MOI"]
87
```

docs/src/background/infeasibility_certificates.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
```@meta
22
CurrentModule = MathOptInterface
33
DocTestSetup = quote
4-
using MathOptInterface
5-
const MOI = MathOptInterface
4+
import MathOptInterface as MOI
65
end
76
DocTestFilters = [r"MathOptInterface|MOI"]
87
```
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
```@meta
22
CurrentModule = MathOptInterface
33
DocTestSetup = quote
4-
using MathOptInterface
5-
const MOI = MathOptInterface
4+
import MathOptInterface as MOI
65
end
76
DocTestFilters = [r"MathOptInterface|MOI"]
87
```
98

109
# Naming conventions
1110

12-
MOI follows several conventions for naming functions and structures. These
11+
MOI follows several conventions for naming functions and structures. These
1312
should also be followed by packages extending MOI.
1413

1514
## Sets
1615

17-
Sets encode the structure of constraints. Their names should follow the
18-
following conventions:
16+
Sets encode the structure of constraints. Their names should follow the
17+
following conventions:
1918

2019
* Abstract types in the set hierarchy should begin with `Abstract` and end in
2120
`Set`, e.g., [`AbstractScalarSet`](@ref), [`AbstractVectorSet`](@ref).
@@ -26,10 +25,10 @@ following conventions:
2625
* Matrix-valued conic sets should provide two representations: `ConeSquare` and
2726
`ConeTriangle`, e.g., [`RootDetConeTriangle`](@ref) and
2827
[`RootDetConeSquare`](@ref). See [Matrix cones](@ref) for more details.
29-
* Scalar sets should be singular, not plural, e.g., [`Integer`](@ref), not
28+
* Scalar sets should be singular, not plural, e.g., [`Integer`](@ref), not
3029
`Integers`.
31-
* As much as possible, the names should follow established conventions in the
32-
domain where this set is used: for instance, convex sets should have names
33-
close to those of [CVX](http://web.cvxr.com/cvx/doc/), and
34-
constraint-programming sets should follow
30+
* As much as possible, the names should follow established conventions in the
31+
domain where this set is used: for instance, convex sets should have names
32+
close to those of [CVX](http://web.cvxr.com/cvx/doc/), and
33+
constraint-programming sets should follow
3534
[MiniZinc](https://www.minizinc.org/doc-latest/en/)'s constraints.

docs/src/manual/constraints.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
```@meta
22
CurrentModule = MathOptInterface
33
DocTestSetup = quote
4-
using MathOptInterface
5-
const MOI = MathOptInterface
4+
import MathOptInterface as MOI
65
end
76
DocTestFilters = [r"MathOptInterface|MOI"]
87
```

docs/src/manual/models.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
```@meta
22
CurrentModule = MathOptInterface
33
DocTestSetup = quote
4-
using MathOptInterface
5-
const MOI = MathOptInterface
4+
import MathOptInterface as MOI
65
end
76
DocTestFilters = [r"MathOptInterface|MOI"]
87
```
@@ -29,8 +28,7 @@ section for more details.
2928
MOI does not export functions, but for brevity we often omit qualifying
3029
names with the MOI module. Best practice is to have
3130
```julia
32-
using MathOptInterface
33-
const MOI = MathOptInterface
31+
import MathOptInterface as MOI
3432
```
3533
and prefix all MOI methods with `MOI.` in user code. If a name is also
3634
available in base Julia, we always explicitly use the module prefix, for

docs/src/manual/modification.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
```@meta
22
CurrentModule = MathOptInterface
33
DocTestSetup = quote
4-
using MathOptInterface
5-
const MOI = MathOptInterface
4+
import MathOptInterface as MOI
65
end
76
DocTestFilters = [r"MathOptInterface|MOI"]
87
```

docs/src/manual/solutions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
```@meta
22
CurrentModule = MathOptInterface
33
DocTestSetup = quote
4-
using MathOptInterface
5-
const MOI = MathOptInterface
4+
import MathOptInterface as MOI
65
end
76
DocTestFilters = [r"MathOptInterface|MOI"]
87
```

docs/src/manual/standard_form.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
```@meta
22
CurrentModule = MathOptInterface
33
DocTestSetup = quote
4-
using MathOptInterface
5-
const MOI = MathOptInterface
4+
import MathOptInterface as MOI
65
end
76
DocTestFilters = [r"MathOptInterface|MOI"]
87
```

docs/src/manual/variables.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
```@meta
22
CurrentModule = MathOptInterface
33
DocTestSetup = quote
4-
using MathOptInterface
5-
const MOI = MathOptInterface
4+
import MathOptInterface as MOI
65
end
76
DocTestFilters = [r"MathOptInterface|MOI"]
87
```

docs/src/reference/callbacks.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
```@meta
22
CurrentModule = MathOptInterface
33
DocTestSetup = quote
4-
using MathOptInterface
5-
const MOI = MathOptInterface
4+
import MathOptInterface as MOI
65
end
76
DocTestFilters = [r"MathOptInterface|MOI"]
87
```

0 commit comments

Comments
 (0)