|
2 | 2 | # The LICENSE.md file contains full licensing details. |
3 | 3 | import argparse |
4 | 4 | from get_variables_from_recipe import get_variables_from_recipe |
5 | | -from fetch_recipe import fetch_recipe |
6 | 5 | from update_recipe_file import update_recipe_file |
7 | 6 |
|
8 | 7 |
|
@@ -58,70 +57,6 @@ def main_for_get_variables_from_recipe(arguments=None): |
58 | 57 | get_variables_from_recipe(args.recipe_path, args.output_filepath) |
59 | 58 |
|
60 | 59 |
|
61 | | -def parse_args_for_fetch_recipe(arguments): |
62 | | - """ |
63 | | - Return the names and values of the command line arguments for |
64 | | - :func:`main_for_fetch_recipe`. |
65 | | -
|
66 | | - Parameters |
67 | | - ---------- |
68 | | - arguments : :obj:`list` of :obj:`str` |
69 | | - The command line arguments to be parsed. |
70 | | -
|
71 | | - Returns |
72 | | - ------- |
73 | | - :class:`argparse.Namespace` |
74 | | - The names and values of the command line arguments. |
75 | | - """ |
76 | | - parser = argparse.ArgumentParser( |
77 | | - description="Retrieve an ESMValTool recipe.", |
78 | | - formatter_class=argparse.ArgumentDefaultsHelpFormatter, |
79 | | - ) |
80 | | - parser.add_argument( |
81 | | - "--recipe_id", |
82 | | - help=( |
83 | | - "The short identifier of the recipe to retrieve, " |
84 | | - "as written in the `flow.cylc` file." |
85 | | - ), |
86 | | - ) |
87 | | - parser.add_argument( |
88 | | - "--recipe_dict_fp", |
89 | | - help=( |
90 | | - "The filepath of the YAML file containing the " |
91 | | - "name and location within esmvaltool.recipes " |
92 | | - "of the recipe to be fetched." |
93 | | - ), |
94 | | - ) |
95 | | - parser.add_argument( |
96 | | - "--output_filepath", |
97 | | - help=( |
98 | | - "The full path to the where the " |
99 | | - "ESMValTool recipe will be written." |
100 | | - ), |
101 | | - ) |
102 | | - return parser.parse_args(arguments) |
103 | | - |
104 | | - |
105 | | -def main_for_fetch_recipe(arguments=None): |
106 | | - """ |
107 | | - Retrieve an ESMValTool recipe. |
108 | | -
|
109 | | - Parameters |
110 | | - ---------- |
111 | | - arguments : :obj:`list` of :obj:`str` |
112 | | - The command line arguments to be parsed. |
113 | | - """ |
114 | | - # Parse the arguments. |
115 | | - args = parse_args_for_fetch_recipe(arguments) |
116 | | - |
117 | | - # Run the code. |
118 | | - print("Fetching recipe.") |
119 | | - print(f"Recipe ID: {args.recipe_id}") |
120 | | - print(f"Recipe dict filepath: {args.recipe_dict_fp}") |
121 | | - print(f"Output filepath: {args.output_filepath}") |
122 | | - fetch_recipe(args.recipe_id, args.recipe_dict_fp, args.output_filepath) |
123 | | - |
124 | | - |
125 | 60 | def parse_args_for_update_recipe_file(arguments): |
126 | 61 | """ |
127 | 62 | Return the names and values of the command line arguments for |
|
0 commit comments