python-sphinx

Sphinx decorated classes not documented

风格不统一 提交于 2020-08-11 05:34:21
问题 I'm documenting my library with Sphinx. And I have decorator logic_object : class logic_object: """Decorator for logic object class. """ def __init__(self, cls): self.cls = cls self.__doc__ = self.cls.__doc__ And I have gravity class that decorated by logic_object : @logic_object class gravity: """Basic gravity object logic class. :param float g: pixels of acceleration :param float jf: jump force """ #There is more not important code. My Sphinx .rst file is: Mind.Existence ===================

Running Sphinx html make gets stuck after reading sources

爷,独闯天下 提交于 2020-08-10 08:27:28
问题 I am trying to use Sphinx for the first time to get documentation from docstrings in my code. I am currently using pycharm to run a sphinx task but I did not have luck with the command line either. The problem is that the process gets struck without returning any error: Running Sphinx v1.2.2 loading pickled environment... done building [html]: targets for 1 source files that are out of date updating environment: 0 added, 1 changed, 0 removed reading sources... [100%] index Then nothing. I

Running Sphinx html make gets stuck after reading sources

北城余情 提交于 2020-08-10 08:23:24
问题 I am trying to use Sphinx for the first time to get documentation from docstrings in my code. I am currently using pycharm to run a sphinx task but I did not have luck with the command line either. The problem is that the process gets struck without returning any error: Running Sphinx v1.2.2 loading pickled environment... done building [html]: targets for 1 source files that are out of date updating environment: 0 added, 1 changed, 0 removed reading sources... [100%] index Then nothing. I

Parsing javadoc with Python-Sphinx

廉价感情. 提交于 2020-08-02 07:46:30
问题 I use a shared repository partly containing Java and Python code. The code basis mainly stands on python, but some libraries are written in Java. Is there a possibility to parse or preprocess Java documentation in order to use it later in Python-Sphinx or even a plugin? 回答1: The javadoc command allows you to write and use your own doclet classes to generate documentation in whatever form you choose. The output doesn't need to be directly human-readable ... so there's nothing stopping you

Parsing javadoc with Python-Sphinx

▼魔方 西西 提交于 2020-08-02 07:45:20
问题 I use a shared repository partly containing Java and Python code. The code basis mainly stands on python, but some libraries are written in Java. Is there a possibility to parse or preprocess Java documentation in order to use it later in Python-Sphinx or even a plugin? 回答1: The javadoc command allows you to write and use your own doclet classes to generate documentation in whatever form you choose. The output doesn't need to be directly human-readable ... so there's nothing stopping you

How use :private-members: to show mangled member value constants in Sphinx

隐身守侯 提交于 2020-07-22 21:35:33
问题 How can I get the value of a constant into my Sphinx documentation? .. automodule:: mymodule :members: :private-members: This is my test module: class Test: """My Test Class""" __MY_TEST_CONSTANT = 98.2 """My test constant docu""" At the moment I get the description of my private constant but the value is "None" and not "98.2". class Test: My Test Class __MY_TEST_CONSTANT = None My test constant docu 回答1: I tested this and I'm pretty sure it's either: an undocumented feature, a bug, or both.

How use :private-members: to show mangled member value constants in Sphinx

☆樱花仙子☆ 提交于 2020-07-22 21:35:00
问题 How can I get the value of a constant into my Sphinx documentation? .. automodule:: mymodule :members: :private-members: This is my test module: class Test: """My Test Class""" __MY_TEST_CONSTANT = 98.2 """My test constant docu""" At the moment I get the description of my private constant but the value is "None" and not "98.2". class Test: My Test Class __MY_TEST_CONSTANT = None My test constant docu 回答1: I tested this and I'm pretty sure it's either: an undocumented feature, a bug, or both.

create a role (font color) in sphinx that works with `make latexpdf`

匆匆过客 提交于 2020-07-14 07:09:01
问题 I'm used to write Rest documents while I never used LaTex. What I would like to do is create some font color roles that I can add inline the text (e.g. :red: this text is red ) that work both in html and in latexpdf compilation. I've found a similar question here, but I cannot reproduce it. I think that the magic will be done changing the conf.py file, but I didn't find out how. Moreover, during the latexpdf compilation, in the _build/latex directory, there is a sphinx.sty file that contains

Sphinx autodoc gets stuck on random.choice() using mock

回眸只為那壹抹淺笑 提交于 2020-07-09 12:13:08
问题 This is a continuation of a question I originally asked in this post: random.choice error due to np.linspace and np.logspace In this question, I have stripped down the problem to the bare minimum and was able to reproduce the problem where Sphinx is hanging up on the random.choice() function. Here is the Python code in the file randor_test.py; it runs in PyCharm: import random import numpy as np def rand_test(svr_C, svr_gamma): """This is test docstring #. item one #. item two """ ml_params =

Sphinx autodoc gets stuck on random.choice() using mock

冷暖自知 提交于 2020-07-09 12:09:20
问题 This is a continuation of a question I originally asked in this post: random.choice error due to np.linspace and np.logspace In this question, I have stripped down the problem to the bare minimum and was able to reproduce the problem where Sphinx is hanging up on the random.choice() function. Here is the Python code in the file randor_test.py; it runs in PyCharm: import random import numpy as np def rand_test(svr_C, svr_gamma): """This is test docstring #. item one #. item two """ ml_params =