vatlab / sos

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

Using a sos namespace #1540

Open BoPeng opened 5 months ago

BoPeng commented 5 months ago

One of the problems with sos if that sos is built on top of python so there is a high probability of name clash. For example, users could accidentally define run and clash with our run action.

We have tried to resolve this issue with _input, SOS_CONFIG etc, but things like python still has a high risk of name conflict. I propose that we put everything into a sos namespace so that

In this way, sos adds on top of Python

  1. Directives such as input:, output:, depends:, task:.
  2. A syntax sugar for scripting running actions such as R: and Python:.
  3. A sos namespace with data and functions.

Backward compatibility can be temporarily retained by making existing objects available (e.g. R:) but gives a deprecation warning.

Note that

  1. the level of change may trigger the development of sos.2 in a separate repository, where we will reexamine the generic design and implementation issues with sos, such as remote/multi-node execution, and subworkflows.
  2. we need to rigorously define these variables, how they are transferred (across steps, processes, and nodes), and how they change during the execution of the workflows. This is especially important for concurrent execution of substeps using async.