question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
skorskicommented, Apr 27, 2021

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.

2reactions
jdb78commented, Aug 13, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preserve default arguments of wrapped/decorated Python ...
If my module is imported by Sphinx my wrappers return the original functions instead of wrapping them. Thus, the signature is preserved. python...
Read more >
9976 (Decorated functions/methods have generic signature in ...
I am currently working on a related problem, namely a Cython version of the cached_method decorators - see #11115. Why is that related?...
Read more >
What's New In Python 3.3 — Python 3.11.1 documentation
A new function inspect.signature() makes introspection of python callables easy and straightforward. A broad range of callables is supported: python functions, ...
Read more >
Considerations in adopting RHEL 8 Red Hat Enterprise Linux 8
Software FCoE and Fibre Channel no longer support the target mode; 12.2.9. ... two parameters and with any functions decorated with attribute alloc_size...
Read more >
Changelog — pytest documentation
The affected features will be effectively removed in pytest 7.1, ... Before, such tests were silently skipped, and the positional argument ignored.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found