Skip to content

Append table definition to docstring #699

@SimonRenner

Description

@SimonRenner

Thinking about improving the documentation of our own database, we thought it would be nice to add the table definition to its docstring. We do this using a decorator on the table definition somewhat like this:

def docappend(cls):
    cls.__doc__ += cls.definition
    return cls

@docappend
@schema
class MyTable(dj.Imported):
    .....

To us, it seemed like a minor but useful feature to include in a future version of datajoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions