From 4e937d0196d2314c24cafcc103312d7e85ddd079 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Thu, 12 Dec 2024 14:35:33 -0800 Subject: [PATCH 1/4] reducing verbosity --- openfecli/parameters/plan_network_options.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/openfecli/parameters/plan_network_options.py b/openfecli/parameters/plan_network_options.py index e486973f5..c6bd54412 100644 --- a/openfecli/parameters/plan_network_options.py +++ b/openfecli/parameters/plan_network_options.py @@ -180,21 +180,15 @@ def load_yaml_planner_options(path: Optional[str], context) -> PlanNetworkOption _yaml_help = """\ -Path to planning settings yaml file +Path to a YAML file specifying the atom mapper (`mapper:`) and/or network planning algorithm (`network:`) to use. -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 +For example: :: mapper: @@ -208,7 +202,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), From eb4f4ed06452348d3ea0178d2f3a3bf7395b5dae Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Thu, 12 Dec 2024 14:46:16 -0800 Subject: [PATCH 2/4] simplifying supported option specs --- openfecli/parameters/plan_network_options.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/openfecli/parameters/plan_network_options.py b/openfecli/parameters/plan_network_options.py index c6bd54412..5f9aea33c 100644 --- a/openfecli/parameters/plan_network_options.py +++ b/openfecli/parameters/plan_network_options.py @@ -182,11 +182,10 @@ def load_yaml_planner_options(path: Optional[str], context) -> PlanNetworkOption _yaml_help = """\ Path to a YAML file specifying the atom mapper (`mapper:`) and/or network planning algorithm (`network:`) to use. -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. +Supported atom mapper choices include `LomapAtomMapper` or `KartografAtomMapper`. +Supported network planning algorithms include `generate_minimal_spanning_tree` or `generate_minimal_redundant_network`. + +The `settings:` allows for customizing the algorithm using the keyword arguments of the corresponding Python API. For example: :: From 4741f3dbfedc6ff109ce1e590d312c311dd5b1a5 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Thu, 12 Dec 2024 14:48:06 -0800 Subject: [PATCH 3/4] clarifying settings wording --- openfecli/parameters/plan_network_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfecli/parameters/plan_network_options.py b/openfecli/parameters/plan_network_options.py index 5f9aea33c..ae75c6162 100644 --- a/openfecli/parameters/plan_network_options.py +++ b/openfecli/parameters/plan_network_options.py @@ -185,7 +185,7 @@ def load_yaml_planner_options(path: Optional[str], context) -> PlanNetworkOption Supported atom mapper choices include `LomapAtomMapper` or `KartografAtomMapper`. Supported network planning algorithms include `generate_minimal_spanning_tree` or `generate_minimal_redundant_network`. -The `settings:` allows for customizing the algorithm using the keyword arguments of the corresponding Python API. +The `settings:` allows for passing in any keyword arguments of the method's corresponding Python API. For example: :: From f042cf2986435bec3653a2212404b53445d69e95 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Wed, 18 Dec 2024 15:53:29 -0800 Subject: [PATCH 4/4] add generate_radial_network as option --- openfecli/parameters/plan_network_options.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openfecli/parameters/plan_network_options.py b/openfecli/parameters/plan_network_options.py index ae75c6162..0810a95a9 100644 --- a/openfecli/parameters/plan_network_options.py +++ b/openfecli/parameters/plan_network_options.py @@ -182,8 +182,14 @@ def load_yaml_planner_options(path: Optional[str], context) -> PlanNetworkOption _yaml_help = """\ Path to a YAML file specifying the atom mapper (`mapper:`) and/or network planning algorithm (`network:`) to use. -Supported atom mapper choices include `LomapAtomMapper` or `KartografAtomMapper`. -Supported network planning algorithms include `generate_minimal_spanning_tree` or `generate_minimal_redundant_network`. +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.