zoonproject / zoon

The zoon R package
Other
61 stars 13 forks source link

add function to generate the arguments to a module #408

Closed smwindecker closed 6 years ago

smwindecker commented 6 years ago

added a function called ModuleArguments, which takes the module name and returns to the console the function's arguments. It only returns those a user can define (so not including the zoon-specific . files).

codecov-io commented 6 years ago

Codecov Report

Merging #408 into master will increase coverage by 0.02%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #408      +/-   ##
=========================================
+ Coverage   93.07%   93.1%   +0.02%     
=========================================
  Files          28      29       +1     
  Lines        3638    3653      +15     
=========================================
+ Hits         3386    3401      +15     
  Misses        252     252
Impacted Files Coverage Δ
R/ModuleArguments.R 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c5cc000...f46baee. Read the comment docs.

smwindecker commented 6 years ago

will add test code.

AugustT commented 6 years ago

@smwindecker You evaluate the module in the global environment to then be able to get the formals. To avoid this function appearing in the users environment could you evaluate it in the local environment of the function or alternatively remove the function from the environment after you have got the formals? @goldingn can probably advise

smwindecker commented 6 years ago

Thanks @AugustT I'll revise.

smwindecker commented 6 years ago

did that do the trick?

AugustT commented 6 years ago

Looks good to me... In it goes :)

AugustT commented 6 years ago

Haha, closed before mergeing, whoops. Should be in the master version now