Skip to content

Commit

Permalink
Add "mix-models ssp transport --method=B" option
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Jan 14, 2025
1 parent 373fb63 commit 202c41c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions message_ix_models/project/ssp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ def gen_structures(context, **kwargs):


@cli.command("transport")
@click.option("--method", type=click.Choice(["A", "B"]), required=True)
@click.argument("path_in", type=click.Path(exists=True, dir_okay=False, path_type=Path))
@click.argument(
"path_out",
type=click.Path(exists=True, dir_okay=False, path_type=Path),
required=False,
)
@click.pass_obj
def transport_cmd(context: "Context", path_in: Path, path_out: Optional[Path]):
def transport_cmd(context: "Context", method, path_in: Path, path_out: Optional[Path]):
"""Postprocess aviation emissions.
Data are read from PATH_IN, in .xlsx or .csv format. If .xlsx, the data are first
Expand Down Expand Up @@ -64,7 +65,7 @@ def transport_cmd(context: "Context", path_in: Path, path_out: Optional[Path]):
else:
path_out_user = path_out

main(path_in, path_out)
main(path_in, path_out, method)

Check warning on line 68 in message_ix_models/project/ssp/cli.py

View check run for this annotation

Codecov / codecov/patch

message_ix_models/project/ssp/cli.py#L68

Added line #L68 was not covered by tests

if path_out_user != path_out:
print(f"Convert CSV output to {path_out_user}")
Expand Down

0 comments on commit 202c41c

Please sign in to comment.