It's a useful pattern to have the entry point functions accepts args_list: Optinal[list] = None and then use:
if args_list is None:
args_list = sys.argv[1:]
This is a developer and testing facing argument that is used to simulate command line arguments, allowing this function to be called directly. For example, safedata_validate show_resources can be replicated by calling _safedata_validate_cli(['show_resources']).
This is motivated by trying to track down a currently undiagnosed issue with file handling. More to come.
It's a useful pattern to have the entry point functions accepts
args_list: Optinal[list] = None
and then use:This is a developer and testing facing argument that is used to simulate command line arguments, allowing this function to be called directly. For example,
safedata_validate show_resources
can be replicated by calling_safedata_validate_cli(['show_resources'])
.This is motivated by trying to track down a currently undiagnosed issue with file handling. More to come.