erlexec
erlexec copied to clipboard
expose key parameters from upstream dependencies, but delegate extras
We want to introduce a new pattern in DocArray where, in case we use an upstream dependency, we do not try to expose all of its parameters, but instead, expose only the necessary ones and delegate extras in kwargs. For example, suppose we use a function from a dependency with the following signiature:
def func(key_param1, key_param2, extra_param1=None, extra_param2=None)
What we should be doing in a docarray public API is the following:
def public_method(self, key_param1, key_param2, **kwargs):
...
func(key_param1, key_param2, **kwargs)
Instead of trying to expose all parameters. This pattern should be a rule in docarray development and applied first to storage backend configurations and APIs and to convert methods.