rich-garden-69988
01/18/2023, 11:15 PMthankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
rich-garden-69988
01/19/2023, 1:11 AM@task
decorator.
from flytekit import task
@task
def test_task(x: int) -> int:
"""My test task.
Args:
x: Integer for test
"""
return x
Autodoc picks up the file, but does not document test_task
- still trying to figure out why, but I think it has something to do with the decorator converting the object to a PythonFunctionTask
instancerich-garden-69988
01/19/2023, 1:12 AMtest_task
function is properly documented with sphinx-autodocrich-garden-69988
01/19/2023, 1:14 AM__doc__
property 🤔rich-garden-69988
01/19/2023, 1:17 AMthankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
rich-garden-69988
01/19/2023, 1:19 AMthankful-minister-83577
thankful-minister-83577
rich-garden-69988
01/19/2023, 1:32 AMrich-garden-69988
01/19/2023, 1:33 AM.. automodule:: flyte_common.my_task
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: flyte_common.my_task.my_task
:members:
^ Seems like using automodule is not working, but autoclass directly on the task is working..thankful-minister-83577
thankful-minister-83577
rich-garden-69988
01/19/2023, 1:42 AM[app] emitting event: 'autodoc-skip-member'('module', 'example_task', <flytekit.core.python_function_task.PythonFunctionTask object at 0x7fb9c4
[app] emitting event: 'autodoc-skip-member'('module', 'example_workflow', WorkflowBase - flyte_common.my_task.example_workflow && Inputs (1): {
rich-garden-69988
01/19/2023, 2:09 AM