@@ -28,48 +28,4 @@ const app = function(name, analysis,
2828 );
2929}
3030
31- # ' check of the required app slot
32- # '
33- const app_check.signature = function (app ) {
34- all([" name" , " call" ] in names(app ));
35- }
36-
37- # ' Check the function signature of the app function
38- # '
39- # ' @param analysis a callable function to check, just check of the required
40- # ' parameters is exists in the definition or not.
41- # '
42- # ' @details the analysis function should contains only two
43- # ' required parameters with specific name defined:
44- # '
45- # ' 1. app: a list object that defines the app object itself
46- # ' 2. context: a list object that accept the workflow environment context
47- # '
48- # ' due to the reason of analysis app function is called via the ``do.call``
49- # ' function from the RENV base environment, so that the parameter value is
50- # ' aligned with the invoke function target strictly, so you can not change
51- # ' the parameter name or the parameter will not be aligned properly when
52- # ' call this analysis app function.
53- # '
54- const app_check.delegate = function (analysis ) {
55- const pars = as.list(args(name = analysis ));
56- const verbose = getOption(" verbose" );
57-
58- if (as.logical(verbose )) {
59- str(pars );
60- }
61-
62- # pars contains 3 slot value:
63- #
64- # 1. empty_name: the function declare info, includes name and the
65- # possible function value type
66- # 2. other_name: the function parameter name.
67-
68- if (length(pars ) != 3 ) {
69- echo_warning(" the analysis application function required 2 parameters!" );
70- return (FALSE );
71- } else {
72- return (all([" app" , " context" ] in names(pars )));
73- }
74- }
7531
0 commit comments