|
| 1 | +# Checklists |
| 2 | + |
| 3 | +The purpose of this page is to collate a series of checklists for commonly |
| 4 | +performed changes to the source code of MathOptInterface. |
| 5 | + |
| 6 | +In each case, copy the checklist into the description of the pull request. |
| 7 | + |
| 8 | +## Adding a new set |
| 9 | + |
| 10 | +Use this checklist when adding a new set to the MathOptInterface repository. |
| 11 | + |
| 12 | +``` |
| 13 | +## Basic |
| 14 | +
|
| 15 | + - [ ] Add a new `AbstractScalarSet` or `AbstractVectorSet` to `src/sets.jl` |
| 16 | + - [ ] If `isbitstype(S) == false`, implement `Base.copy(set::S)` |
| 17 | + - [ ] If `isbitstype(S) == false`, implement `Base.:(==)(x::S, y::S)` |
| 18 | + - [ ] If an `AbstractVectorSet`, implement `dimension(set::S)`, unless the |
| 19 | + dimension is given by `set.dimension`. |
| 20 | +
|
| 21 | +## Utilities |
| 22 | +
|
| 23 | + - [ ] If an `AbstractVectorSet`, implement `Utilities.set_dot`, |
| 24 | + unless the dot product between two vectors in the set is equivalent to |
| 25 | + `LinearAlgebra.dot` |
| 26 | + - [ ] If an `AbstractVectorSet`, implement `Utilities.set_with_dimension` in |
| 27 | + `src/Utilities/matrix_of_constraints.jl` |
| 28 | + - [ ] Add the set to the `@model` macro at the bottom of `src/Utilities.model.jl` |
| 29 | +
|
| 30 | +## Documentation |
| 31 | +
|
| 32 | + - [ ] Add a docstring, which gives the mathematical definition of the set, |
| 33 | + along with an `## Example` block containing a `jldoctest` |
| 34 | + - [ ] Add the docstring to `docs/src/reference/standard_form.md` |
| 35 | + - [ ] Add the set to the relevant table in `docs/src/manual/standard_form.md` |
| 36 | + |
| 37 | +## Tests |
| 38 | +
|
| 39 | + - [ ] Define a new `_set(::Type{S})` method in `src/Test/test_basic_constraint.jl` |
| 40 | + and add the name of the set to the list at the bottom of that files |
| 41 | + - [ ] If the set has any checks in its constructor, add tests to `test/sets.jl` |
| 42 | +
|
| 43 | +## MathOptFormat |
| 44 | +
|
| 45 | + - [ ] Open an issue at `https://github.com/jump-dev/MathOptFormat` to add |
| 46 | + support for the new set {{ replace with link to the issue }} |
| 47 | +
|
| 48 | +## Optional |
| 49 | +
|
| 50 | + - [ ] Implement `dual_set(::S)` and `dual_set_type(::Type{S})` |
| 51 | + - [ ] Add new tests to the `Test` submodule exercising your new set |
| 52 | + - [ ] Add new bridges to convert your set into more commonly used sets |
| 53 | +``` |
0 commit comments