dagster: Sphinx ignores decorated functions such as `@solid` due to missing signature

Problem: When documenting a codebase that contains functions decorated with @solid (or other dagster decorators), the functions are not picked up by automodule, i.e. they are not documented.

Cause: The reason for this behaviour is that sphinx looks for the doc attribute which must be copied if a function is decorated.

Fix: Copying the doc attribute, e.g. by using functools or dynamically creating a doc attribute.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 2
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Is there a resolution on documentation? We use autodoc and I’m not sure where to add @muthugit suggestion of autofunction. This is certainly a big missing feature for us as all solids are excluded from our documentation.

@muthugit Great to know that works. I wonder if docs can become automatic with automodule as well.

I managed to get this working by adapting what Celery did for Sphinx. I’ve included the code here. It would be great to see this added to Dagster at some point in the future. parser.txt

We could autogen docstrings for the SolidDefinition instances that included an Args block with a custom wrapper. I can maybe take a crack at this