ml-tooling / lazydocs

📖 Generate markdown API documentation from Google-style Python docstring. The lazy alternative to Sphinx.
MIT License
205 stars 38 forks source link

Comments "in between" functions for structuring doc #49

Closed Hermann-SW closed 9 months ago

Hermann-SW commented 1 year ago

Feature description:

Add ability to add comment for generated lazydocs output between functions.

Problem and motivation:

Allows to structure groups of functions.

Is this something you're interested in working on?

No experience with act.

What I did sofar is to use dummy function definitions to achieve the requested feature as workaround:

...
    return int(lcm(p-1, q-1))

def SECTION5():
    '''
    Functions on factorization dictionaries.

    [as returned by sympy.factorint() (in rsa[x][4] for p-1 and rsa[x][5] for q-1) ]
    '''
    return
def dict_int(d):
...

This works, but creates a dummy function for each inter function comment, and one has to remember to have the final return.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

Hermann-SW commented 1 year ago

I don't know the process, but shouldn't somebody review this issue before marking stale and auto closing?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

epogrebnyak commented 10 months ago

This something you can achieve with Sphinx and mkdocstrings. In mkdocstrings in particular you can write the comment in markdown, then insert function docs.

Also from a broader perspective grouping inside module may be a sign you might split the module in parts, or add classes that hold groups of methods.