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
Motivation: Why do you think this is important?
As part of #531 it will be necessary to parse user docstrings to add variable descriptions to populate this field. The UI can render these descriptions to aid in visualizing and launching workflows and eventually these may be searchable as well
say for example a user defines a python task using RST documentation for an example like so
@task
def my_task(foo: int, bar: str) -> bool:
"""
:param foo: Some foo description here
:param bar: Other bar description here
:return: Description of return type here
...
We want to capture these sphinx-style docstrings and use them for the variable descriptions. Note, since we're using python 3 we don't need the docstrings to capture the variable types (so those are entirely optional)
We'll want to capture both task and workflow input and output variable descriptions
Other things to consider:
NamedTuples as return types: If multiple objects are returned we'll want to specify descriptions for each response object
Do we want to support additional user documentation formats such as napoleon?
These considerations can be handled in follow-up PRs.
The flytekit Variable already supports serializing descriptions so initializing it with a description is all that is necessary.
Describe alternatives you've considered
This python PEP proposes an RST-native docstring format so keeping with the official python guidance should be sufficient.
[Optional] Propose: Link/Inline OR Additional context
If you have ideas about the implementation please propose the change. If inline keep it short, if larger then you link to an external document.
The text was updated successfully, but these errors were encountered:
Motivation: Why do you think this is important?
As part of #531 it will be necessary to parse user docstrings to add variable descriptions to populate this field. The UI can render these descriptions to aid in visualizing and launching workflows and eventually these may be searchable as well
Goal: What should the final outcome look like, ideally?
Referencing the suggested python rst docstring format,
say for example a user defines a python task using RST documentation for an example like so
We want to capture these sphinx-style docstrings and use them for the variable descriptions. Note, since we're using python 3 we don't need the docstrings to capture the variable types (so those are entirely optional)
It might help to take a look at transform_signature_to_interface as part of getting started on this.
We'll want to capture both task and workflow input and output variable descriptions
Other things to consider:
These considerations can be handled in follow-up PRs.
The flytekit Variable already supports serializing descriptions so initializing it with a description is all that is necessary.
Describe alternatives you've considered
This python PEP proposes an RST-native docstring format so keeping with the official python guidance should be sufficient.
[Optional] Propose: Link/Inline OR Additional context
If you have ideas about the implementation please propose the change. If inline keep it short, if larger then you link to an external document.
The text was updated successfully, but these errors were encountered: