pyiron_base
pyiron_base copied to clipboard
Add wrap() function which combines wrap_executable() and wrap_python_function()
@samwaseda and I had a discussion about simplifying the user interface of executorlib and pyiron_base. The primary question is: Should we provide two separate functions, one to wrap external executables which have to be executed in a separate subprocess and one for python functions, or should both be combined in a single function. The argument for combining both is that it simplifies the interface for the user, because from their perspective it makes no difference what they execute, it should behave in the same way for external executables and python functions. The argument for keeping both separated is that they return technically different objects depending on whether the input is a string for the external executable command or a python function.
In this pull request I implement a general wrap() function which combines wrap_executable() and wrap_python_function(). If this pull request gets merged, then we could move wrap_executable() and wrap_python_function() to hidden functions.