The @ray.remote decorator breaks Sphinx autoclass extension.
See original GitHub issueSystem information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Mac OS X 10.13.5
- Ray installed from (source or binary): both
- Ray version: 0.5.0
- Python version: Python 2.7.10
- Exact command to reproduce: See below.
Describe the problem
Ray decorators breaks Sphinx autoclass extension.
If a class is decorated and documented using docstrings, documentation is not generated. The MyClass
class can still be imported by Sphinx.
@ray.remote(num_gpus=1)
class MyClass(object):
""" lorum ipsum """
...
I use the Sphinx extension sphinx.ext.autodoc
to build my documentation.
See also Civilize your Python @decorators
Source code / logs
To reproduce this issue, run the following inside a virtualenv
or similar:
git clone git@github.com:martisak/ray_decorator_issue.git
pip install -r requirements.txt
make html
Then open build/html/index.html
in your favorite browser, which should look like the following.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Is it possible to extend Sphinx automodule to domains ...
The answer to my own question is: yes. I've managed to do it, but it wasn't easy and the results are far from...
Read more >sphinx.ext.autodoc – Include documentation from docstrings
This extension can import the modules you are documenting, and pull in documentation from docstrings in a semi-automatic way. ... For Sphinx (actually,...
Read more >sphinx-all command man page - python3 ...
In order to use autodoc, you need to activate it in conf.py by putting the string 'sphinx.ext.autodoc' into the list assigned to the...
Read more >decorators — sphinx-toolbox 3.2.0 documentation
Called after parsing title and target text, and creating the reference node (given in refnode ). This method can alter the reference node...
Read more >Proceedings of the 7th Python in Science conference
we don't needlessly break backward compatibility. ... Sphinx-based documentation — This summer saw ... automodule:: matplotlib.pyplot.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
some combination of
wraps
and overriding__doc__
,__signature__
should do it.I’m using ray version 0.8.2 and python version 3.6.9 and I am experiencing the same problem. I’m quite new to python and sphinx, so I don’t understand the solution. Would it be possible for someone to explain it for me?