-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanage.py
85 lines (67 loc) · 2.06 KB
/
manage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import typer
from typing_extensions import Annotated
from components.coinor.example import CoinORExample
from components.cplex.example import CplexExample
from components.gurobi.example import GurobiExample
from components.highs.example import HighsExample
from components.ortools.example import ORToolsExample
from components.scip.example import ScipExample
from components.xpress.example import XpressExample
app = typer.Typer(no_args_is_help=True)
@app.command(no_args_is_help=True)
def coinor(
coinor_example: Annotated[
CoinORExample, typer.Argument(help="The COIN-OR example to run")
],
) -> None:
"""Run the COIN-OR example EXAMPLE."""
coinor_example.run()
@app.command(no_args_is_help=True)
def cplex(
cplex_example: Annotated[
CplexExample, typer.Argument(help="The CPLEX example to run")
],
) -> None:
"""Run the CPLEX example EXAMPLE."""
cplex_example.run()
@app.command(no_args_is_help=True)
def gurobi(
gurobi_example: Annotated[
GurobiExample, typer.Argument(help="The Gurobi example to run")
],
) -> None:
"""Run Gurobi example EXAMPLE."""
gurobi_example.run()
@app.command(no_args_is_help=True)
def highs(
highs_example: Annotated[
HighsExample, typer.Argument(help="The HiGHS example to run")]
) -> None:
"""Run HiGHS example EXAMPLE."""
highs_example.run()
@app.command(no_args_is_help=True)
def ortools(
ortools_example: Annotated[
ORToolsExample, typer.Argument(help="The OR-Tools example to run")
],
) -> None:
"""Run OR-Tools example EXAMPLE."""
ortools_example.run()
@app.command(no_args_is_help=True)
def scip(
scip_example: Annotated[
ScipExample, typer.Argument(help="The SCIP example to run")
],
) -> None:
"""Run SCIP example EXAMPLE."""
scip_example.run()
@app.command(no_args_is_help=True)
def xpress(
xpress_example: Annotated[
XpressExample, typer.Argument(help="The Xpress example to run")
],
) -> None:
"""Run Xpress example EXAMPLE."""
xpress_example.run()
if __name__ == "__main__":
app()