Skip to content

Pull duplicated functions into a common directory #368

@NParsonsMO

Description

@NParsonsMO

As mentioned in this comment:
#130 (comment)

The functions

  • write_recipe in CMEW/app/configure_for/bin/update_recipe_file.py and
  • write_dict_to_yaml in CMEW/app/add_datasets/bin/add_datasets_to_share.py
    are actually the same function (one with a more generic name) and should be pulled into a common directory.

CMEW/lib/python/ automatically gets added to PYTHONPATH when the workflow is run, so I initially experimented with writing write_recipe into CMEW/lib/python/common.py. The changes to unit tests (mostly the ability to run them locally) made this into a larger piece of work than anticipated, so I'm writing this as a separate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions