From bb90b0715c0d5130fd4552a3e3ee1db100b11c6e Mon Sep 17 00:00:00 2001 From: Alyssa Travitz <31974495+atravitz@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:37:01 -0800 Subject: [PATCH] Simplify settings help message (#1052) * reducing verbosity * simplifying supported option specs * clarifying settings wording * add generate_radial_network as option --- openfecli/parameters/plan_network_options.py | 30 +++++++++----------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/openfecli/parameters/plan_network_options.py b/openfecli/parameters/plan_network_options.py index 5ae0dc496..bdca9318c 100644 --- a/openfecli/parameters/plan_network_options.py +++ b/openfecli/parameters/plan_network_options.py @@ -182,21 +182,20 @@ def load_yaml_planner_options(path: Optional[str], context) -> PlanNetworkOption _yaml_help = """\ -Path to planning settings yaml file - -Currently it can contain sections for customising the -atom mapper and network planning algorithm, -these are addressed using a `mapper:` or `network:` key in the yaml file. -The algorithm to be used for these sections is then specified by the `method:` key. -For choosing mappers, either the LomapAtomMapper or KartografAtomMapper are allowed choices, -while for the network planning algorithm either the generate_minimal_spanning_tree or -generate_minimal_redundant_network options are allowed. -Finally, a `settings:` key can be given to customise the algorithm, -with allowable options corresponding to the keyword arguments of the Python API for these algorithms. - -For example, this is a valid settings yaml file to specify that -the Lomap atom mapper should be used forbidding element changes, -while the generate_minimal_redundant_network function used to plan the network +Path to a YAML file specifying the atom mapper (`mapper:`) and/or network planning algorithm (`network:`) to use. + +Supported atom mapper choices are: + - `LomapAtomMapper` + - `KartografAtomMapper` + +Supported network planning algorithms include (but are not limited to): + - `generate_minimal_spanning_tree` + - `generate_minimal_redundant_network` + - `generate_radial_network` + +The `settings:` allows for passing in any keyword arguments of the method's corresponding Python API. + +For example: :: mapper: @@ -210,7 +209,6 @@ def load_yaml_planner_options(path: Optional[str], context) -> PlanNetworkOption mst_num: 3 """ - YAML_OPTIONS = Option( '-s', "--settings", "yaml_settings", type=click.Path(exists=True, dir_okay=False),