Skip to content

Commit

Permalink
Improve CLI interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ExcaliburZero committed Jul 7, 2024
1 parent 0cce96c commit 2d8e4fb
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions ttdlgc/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Optional
from typing import Annotated, Any, Optional

import logging
import pathlib
Expand All @@ -17,9 +17,17 @@

@app.command()
def solve(
events_filepath: pathlib.Path,
output_solution_filepath: Optional[pathlib.Path] = None,
constraint: Optional[list[Constraint]] = None,
events_filepath: Annotated[
pathlib.Path,
typer.Option(help="Filepath to CSV file containing event information."),
],
output_solution_filepath: Annotated[
Optional[pathlib.Path],
typer.Option(help="Filepath to write the generated choices to."),
] = None,
constraint: Annotated[
Optional[list[Constraint]], typer.Option(help="Constraints to add to the MILP.")
] = None,
verbose: bool = False,
) -> int:
logging.basicConfig(
Expand Down Expand Up @@ -66,8 +74,14 @@ def solve(

@app.command()
def simulate(
events_filepath: pathlib.Path,
input_solution_filepath: pathlib.Path,
events_filepath: Annotated[
pathlib.Path,
typer.Option(help="Filepath to CSV file containing event information."),
],
input_solution_filepath: Annotated[
pathlib.Path,
typer.Option(help="Filepath to CSV file of choices to load as input."),
],
verbose: bool = False,
) -> int:
logging.basicConfig(
Expand Down

0 comments on commit 2d8e4fb

Please sign in to comment.