Skip to content

Refactor update_recipe_file.py to remove KGO files #558

Description

@ehogan
  • ./app/unittest/kgo/blank_recipe_radiation_budget.yml
    • This is used only in the test_return_blank_recipe() test function.
      • The return_blank_recipe() function currently has two responsibilities: loading a recipe, and removing the contents of the dataset section. These responsibilities should be separated into a load_yaml function and a remove_dataset_contents function, making the purpose of each function clearer.
      • Test the new remove_dataset_contents function by passing in an already-loaded recipe and confirming the returned recipe has an empty dataset section. There is no need to test the load_yaml function.
      • Remove the KGO.
  • ./app/unittest/kgo/extended_radiation_budget_recipe.yml
    • This is used only in the test_add_extra_datasets() and test_update_recipe_file() test functions
      • The add_extra_datasets() function currently has three responsibilities: loading the dataset information, constructing the dataset section for a recipe, and adding the dataset section to the recipe. These responsibilities should be separated into a load_yaml function, a construct_dataset_contents function and a add_dataset_contents function, making the purpose of each function clearer.
      • Test the new construct_dataset_contents function and add_dataset_contents function. There is no need to test the load_yaml function.
      • Remove the KGOs.
      • The update_recipe_file() function is the "driver" function. Are other driver functions currently being tested?

Metadata

Metadata

Labels

configureAnything related to configurationquality assuranceAnything related to Quality Assurance (QA)technical debtTechnical debt in CMEWtestingAnything related to testing

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions