Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting tasks via docstrings #1081

Open
idomic opened this issue Mar 17, 2023 · 4 comments
Open

Documenting tasks via docstrings #1081

idomic opened this issue Mar 17, 2023 · 4 comments
Labels
good first issue Good for newcomers

Comments

@idomic
Copy link
Contributor

idomic commented Mar 17, 2023

We have a feature that isn't documented, from a user:

Hi, how do I define the documentation for a particular task in the pipeline? When I run ploomber status, I see the column Doc(short) which is always empty. A follow-up question is can I customize the status report ?

the documentation is extracted from the docstrings (if your function is a task); alternatively, if your task is a script or a notebook, you can define a string at the top of a markdown cell. example:

documentation for my script/notebook

In case of functions that look like the following:

def func1():
    ...
def func2():
    ...
if __name__ == "__main__":
    func1()
    func2()

This is how you add the docstring:

def func():
    """some comment"""
    ...

if you want to customize the output of ploomber status you can use the Python API, you can load your pipeline with this,
then call dag.status() and then you can manipulate the object. here's the Table object that it'll return:

class Table:

We should document this functionality.

@idomic idomic added the good first issue Good for newcomers label Mar 17, 2023
@mehtamohit013
Copy link
Contributor

Acceptance Criteria:

  • Make documentation/tutorial on how one can use dag.status() in conjunction with docstring to enhance their pipeline

@idomic
Copy link
Contributor Author

idomic commented Apr 21, 2023

A Changelog entry is also needed.
Feel free to link a PR.

@Kaushal-Dhungel
Copy link

Hi, can I work on this?

@idomic
Copy link
Contributor Author

idomic commented Apr 22, 2023

Hey @Kaushal-Dhungel this one is already assigned, please pick a different good first issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants