cape.cfdx.caseutils: Common functions for case-control modules

This module provides tools that are used in more than one case-control modules. For example, run_rootdir() is used in more than one place, and putting it here makes the import graph simpler to understand.

Examples of case-control modules include

cape.cfdx.caseutils.run_rootdir(func)

Decorator to run a function within a specified folder

Call:
>>> func = run_rootdir(func)
Wrapper Signature:
>>> v = runner.func(*a, **kw)
Inputs:
func: func

Name of function

runner: CaseRunner

Controller to run one case of solver

a: tuple

Positional args to cntl.func()

kw: dict

Keyword args to cntl.func()

Versions:
  • 2020-02-25 @ddalle: v1.1 (cape.cntl)

  • 2023-06-16 @ddalle: v1.0