[sphinx-users] theme sidebar configuration
The furo theme (with its default setting) has two side bars. The left side bar contains the contents tree for the web pages. The right side bar contains the contents tree for each individual page. This is a very nice feature because headings within a web page do not affect the overall contents tree. This facilitates moving a sub tree to a different location in the web page contents tree (in the spirit of incremental iterative development). Are there other themes that enable one to see these two trees separately ? -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/f9927505-ca2d-41f7-8c42-108ca2ad1106n%40googlegroups.com.
[sphinx-users] python 'constants'
Hi all, I am trying to document python "constants" at the class level and at the level of a method within the class. I am using the tag "#:" following the docstring for the call and the method. My sphinx conf.py file contains: > extensions = [ > 'sphinx.ext.autodoc', > 'sphinx.ext.todo', > 'sphinx.ext.coverage', > ] > Things seem to work following the class but not within the method. My questions are: 1. Why does the (document testing) constant 'bell' show up out of any order following the entry for _main() but before stop()? 2. Why doesn't the useful constant "_yellow" declared within the method _main() not show up at all? Fragments of my code and the output follow? (Yes I think I fat finger posted twice. sorry) ** > > > > *class Run:"""This class runs as a thread in the background as > long as TrainThing is running.* > . . . > > > > > > > > > > > > > > > > > *:raises ValueError: If constant ON_threshold <= OFF_threshold. > **Constants:**"""#: (dict) The mix of red, green, blue LED for > 'yellow' LED#: * * who knows why?bell = {'r': int(255 * 0.9375), > 'g': int(255 * 0.75), 'b': 0}#: (float) Time between display updates > UPDATE_TIME = 2.0#: (int) The degrees C when the fan is turned on in > the auto mode.#: RPi hard threshold of 85 C, soft 80 CON_threshold > = 65#: (int) The degrees C when the fan is turned off in the auto > mode.#: OFF_threshold must be less than ON_thresholdOFF_threshold = > 55* > . . . > > > > > > > > > > > > > > > > > > > > *def _main(self) -> None:"""This method sets up the > initial display values and thenevery 2 seconds checks status and > updating the display for:* The fan is on or off.* The fan > is running in the manually or auto mode.* The cpu frequency is Max, > Min or in between.* the cpu temperature 5 step display ladder. > until variable run_forever is set False by function **stop()** > **Constant:**"""#: (dict) The mix of red, green, blue > LED for 'yellow' LED#: continuation line to match above. > _yellow: Dict[str, int] = {'r': int(255 * 0.9375), 'g': int(255 * 0.75), > 'b': 0}#: TODO figure out why yellow does not show as a Constant in > sphinx* > ** ** > > * class fan.Run(unicorn)This class runs as a thread in the background > as long as TrainThing is running. * > . . . > > > > > > > *Raises: ValueError – If constant ON_threshold <= OFF_threshold. > Constants:OFF_threshold = 55(int) The degrees C when the fan is turned > off in the auto mode. OFF_threshold must be less than ON_threshold* > > > > > > > * (int) The degrees C when the fan is turned on in the auto mode. RPi > hard threshold of 85 C, soft 80 CON_threshold = 65(int) The degrees C > when the fan is turned on in the auto mode. RPi hard threshold of 85 C, > soft 80 CUPDATE_TIME = 2.0(float) Time between display updates* > . . . > > > > > > > > > > > > > > > > > > > > *_main() → NoneThis method sets up the initial display values and then > every 2 seconds checks status and updating the display for:The fan > is on or off.The fan is running in the manually or auto mode. > The cpu frequency is Max, Min or in between.the cpu temperature 5 > step display ladder.until variable run_forever is set False by function > stop()Constant:bell = {'b': 0, 'g': 191, 'r': 239}(dict) The mix of > red, green, blue LED for ‘yellow’ LED * * who knows why?stop() → None¶* > ** -- *Lou* Say what you will about *Sisyphus*. He always has work. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAJg0VX4NwA6NX6b_ucNiXS2fawSohEbNTK-WmbyEA_unkxUr6A%40mail.gmail.com.
[sphinx-users] Python "Constants"
Hi All, I'm sure I'm missing something very basic, I just can't see it. I am trying to document 'constants' used at the Class level and one local to a procedure within the Class. I am using the "#:" tag following the docstrings for the class and the procedure to document the constants. My sphinx conf.py file includes extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', > ] > Following the class things work, but not for the procedure within the class. My questions are: 1. Why does the (test) constant 'bell' defined after the class docstring appear at the end - out of any order -? 2. Why doesn't the real constant '_yellow' defined after procedure _main docstring not appear at all? Code snippets and sphinx out. ** > class Run: > """ > This class runs as a thread in the background as long as TrainThing is > running. > . . . > > :raises ValueError: If constant ON_threshold <= OFF_threshold. > > **Constants:** > """ > #: (dict) The mix of red, green, blue LED for 'yellow' LED > #: * * who knows why? > bell = {'r': int(255 * 0.9375), 'g': int(255 * 0.75), 'b': 0} > #: (float) Time between display updates > UPDATE_TIME = 2.0 > #: (int) The degrees C when the fan is turned on in the auto mode. > #: RPi hard threshold of 85 C, soft 80 C > ON_threshold = 65 > #: (int) The degrees C when the fan is turned off in the auto mode. > #: OFF_threshold must be less than ON_threshold > OFF_threshold = 55 > > . . . > > def _main(self) -> None: > """ > This method sets up the initial display values and then > every 2 seconds checks status and updating the display for: > > * The fan is on or off. > * The fan is running in the manually or auto mode. > * The cpu frequency is Max, Min or in between. > * the cpu temperature 5 step display ladder. > > until variable run_forever is set False by function **stop()** > > **Constant:** > """ > #: (dict) The mix of red, green, blue LED for 'yellow' LED > #: continuation line to match above. > _yellow: Dict[str, int] = {'r': int(255 * 0.9375), 'g': int(255 * > 0.75), 'b': 0} > > #: TODO figure out why yellow does not show as a Constant in sphinx > > * ** > class fan.Run(unicorn) > > This class runs as a thread in the background as long as TrainThing is > running. > . . . > > Raises: ValueError – If constant ON_threshold <= OFF_threshold. > > Constants: > > OFF_threshold = 55 > (int) The degrees C when the fan is turned off in the auto mode. > OFF_threshold must be less than ON_threshold > (int) The degrees C when the fan is turned on in the auto mode. RPi hard > threshold of 85 C, soft 80 C > ON_threshold = 65 > > (int) The degrees C when the fan is turned on in the auto mode. > RPi hard threshold of 85 C, soft 80 C > > UPDATE_TIME = 2.0 > > (float) Time between display updates > > __init__(unicorn) → None > > Initialization starts the FanLib passing the named parameters > on_threshold, off_threshold and auto_time so both modules, fan and FanLib, > have the same values so the unicorn display set by this module and the auto > mode run by FanLib are synchronized. Makes unicorn display methods > available and starts the _main method as a thread. > > _main() → None > > This method sets up the initial display values and then every 2 > seconds checks status and updating the display for: > > The fan is on or off. > > The fan is running in the manually or auto mode. > > The cpu frequency is Max, Min or in between. > > the cpu temperature 5 step display ladder. > > until variable run_forever is set False by function stop() > > Constant: > > bell = {'b': 0, 'g': 191, 'r': 239} > > (dict) The mix of red, green, blue LED for ‘yellow’ LED * * who > knows why? > > > class fan.Run(unicorn) This class runs as a thread in the background as long as TrainThing is running. . . . Raises:ValueError – If constant ON_threshold <= OFF_threshold. Constants: OFF_threshold = 55 (int) The degrees C when the fan is turned off in the auto mode. OFF_threshold must be less than ON_threshold ON_threshold = 65 (int) The degrees C when the fan is turned on in the auto mode. RPi hard threshold of 85 C, soft 80 C UPDATE_TIME = 2.0 (float) Time between display updates . . . _main() → None This method sets up the initial display values and then every 2 seconds checks status and updating the display for: - The fan is on or off. - The fan is running in the manually or auto mode. - The cpu frequency is Max, Min or in between. -The cpu temperature 5 step display ladder. until variable run_forever is set False by function stop() Constant: bell = {'b': 0, 'g':