You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, PSCS doesn't relay information about what the node does. For nodes that rely on existing packages, each node will usually call only one function. We should take the docstring from that function and assign it to the node.
Additionally, we could store the function when the node is initialized, then get the docstring in the .store_as_parameters call.
We would be able to remove the run() definition from most nodes and docstrings would be connected to the underlying package. Something like:
classPipelineNode():
self.function=Nonedefrun(self):
data=self.input_dataself.function(*data, **self.parameters)
self._terminate(data)
classExampleNode(PipelineNode):
self.function=function_to_rundef__init__(self, params):
self.store_vars_as_parameters(**vars())
return# modify store_vars_as_parametersself=kwargs["self"]
ifself.functionisnotNoneandself.__doc__isnotNone:
self.__doc__=self.function.__doc__self._param_doc_=parse_doc(self.__doc__) # there are doc parsers; might be able to get parameter-specific help this way for properly-formatted docstring
The text was updated successfully, but these errors were encountered:
Currently, PSCS doesn't relay information about what the node does. For nodes that rely on existing packages, each node will usually call only one function. We should take the docstring from that function and assign it to the node.
Additionally, we could store the function when the node is initialized, then get the docstring in the
.store_as_parameters
call.We would be able to remove the run() definition from most nodes and docstrings would be connected to the underlying package. Something like:
The text was updated successfully, but these errors were encountered: