vatlab / sos

SoS workflow system for daily data analysis
http://vatlab.github.io/sos-docs
BSD 3-Clause "New" or "Revised" License
274 stars 45 forks source link

Remove `R` etc from sos namespace #1537

Closed BoPeng closed 9 months ago

BoPeng commented 9 months ago

With a large (now 20ish) number of script execution functions, our SoS runtime namespace has a high probability of name conflict with user scripts. Since we do not actually encourage users to use the function form of actions like

R('''script''')

we can reduce all script-execution functions to a single function

run_script('R', '''script''')

Note that the script format of functions will remain, but we will translate

R:
   script

to

run_script('R', '''script''')

instead of the existing

R('''script''')

In addition, it is possible to factor out the run_script function to form its own module so that it can be used outside of SoS.

BoPeng commented 9 months ago

This has been changed to sos_run_script(action, *args, **kwargs). Also, done_if, skip_if etc are no longer actions.

BoPeng commented 9 months ago

Superceded by #1540