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.

Non-deterministic Chapter/Section Numbering

See original GitHub issue

Describe the problem

We are hosting the draft of a textbook here at roboticsbook.org. The website is configured using a github action. However, sometimes the build produces chapter and section numbering in one way, and sometimes in another way. We would like it to be consistent so that chapters are numbered 1, 2, 3 etc. and sections are numbered 1.2, 1.3 etc.

I tried adding a jupyter-book clean . into the workflow book.yml but obviously that did not help, as the action runner starts from a clean slate anyway.

I’m at a loss. Any help would be very welcome, as this issue impedes telling our (400!) enrolled students to look at sections in a consistent way 😕

Link to your repository or website

https://github.com/gtbook/robotics

Steps to reproduce

It is hard to reproduce without cloning the repo, because this happens on a GitHub push event. Every time we push, we don’t know what will happen.

The version of Python you’re using

3.8

Your operating system

Runner on Github is latest ubuntu

Versions of your packages

> jupyter-book --version
Jupyter Book      : 0.12.1
External ToC      : 0.2.3
MyST-Parser       : 0.15.2
MyST-NB           : 0.13.1
Sphinx Book Theme : 0.1.9
Jupyter-Cache     : 0.4.3
NbClient          : 0.5.9

Additional context

Jupyter-book does give warnings related to section numbering:

(gtbook) macbook-pro:robotics dellaert$ jupyter-book build .
Running Jupyter-Book v0.12.1
Source Folder: /Users/dellaert/git/robotics
Config Path: /Users/dellaert/git/robotics/_config.yml
Output Path: /Users/dellaert/git/robotics/_build/html
Running Sphinx v4.3.2
making output directory... done
[etoc] Changing master_doc to 'intro'
[etoc] Excluded 2 extra file(s) not in toc
checking for /Users/dellaert/git/robotics/references.bib in bibtex cache... not found
parsing bibtex file /Users/dellaert/git/robotics/references.bib... parsed 5 entries
myst v0.15.2: MdParserConfig(renderer='sphinx', commonmark_only=False, enable_extensions=['colon_fence', 'dollarmath', 'linkify', 'substitution', 'tasklist'], dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', disable_syntax=[], url_schemes=['mailto', 'http', 'https'], heading_anchors=None, heading_slug_func=None, html_meta=[], footnote_transition=True, substitutions=[], sub_delimiters=['{', '}'], words_per_minute=200)
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 15 source files that are out of date
updating environment: [new config] 15 added, 0 changed, 0 removed
Executing: S10_introduction in: /Users/dellaert/git/robotics                                                                                      
Executing: S11_intro_state in: /Users/dellaert/git/robotics                                                                                       
Executing: S12_intro_actions in: /Users/dellaert/git/robotics                                                                                     
Executing: S13_intro_sensing in: /Users/dellaert/git/robotics                                                                                     
Executing: S14_intro_perception in: /Users/dellaert/git/robotics                                                                                  
Executing: S15_intro_decision in: /Users/dellaert/git/robotics                                                                                    
Executing: S16_intro_learning in: /Users/dellaert/git/robotics                                                                                    
Executing: S20_sorter_intro in: /Users/dellaert/git/robotics                                                                                      
Executing: S21_sorter_state in: /Users/dellaert/git/robotics                                                                                      
Executing: S22_sorter_actions in: /Users/dellaert/git/robotics                                                                                    
Executing: S23_sorter_sensing in: /Users/dellaert/git/robotics                                                                                    
Executing: S24_sorter_perception in: /Users/dellaert/git/robotics                                                                                 
Executing: S25_sorter_decision_theory in: /Users/dellaert/git/robotics                                                                            
Executing: S26_sorter_learning in: /Users/dellaert/git/robotics                                                                                   
Executing: intro in: /Users/dellaert/git/robotics                                                                                                 

looking for now-outdated files... /Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S11_intro_state is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S12_intro_actions is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S13_intro_sensing is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S14_intro_perception is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S15_intro_decision is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S10_introduction.ipynb:30002: WARNING: S16_intro_learning is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S21_sorter_state is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S22_sorter_actions is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S23_sorter_sensing is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S24_sorter_perception is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S25_sorter_decision_theory is already assigned section numbers (nested numbered toctree?)
/Users/dellaert/git/robotics/S20_sorter_intro.ipynb:20002: WARNING: S26_sorter_learning is already assigned section numbers (nested numbered toctree?)
none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] intro                                                                                                                    
generating indices... genindex done
writing additional pages... search done
copying images... [100%] _build/jupyter_execute/S26_sorter_learning_45_0.png                                                                      
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 12 warnings.

The HTML pages are in _build/html.
[etoc] missing index.html written as redirect to 'intro.html'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
choldgrafcommented, Feb 9, 2022

Yeah - the difference is that options: will only be applied to the top page, whereas defaults: will be applied to every page. Sphinx doesn’t want you to add numbered: to each page’s toctree, only the top page, so that is probably what caused the issue

0reactions
choldgrafcommented, Feb 9, 2022

wohoo, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nondeterministic algorithm - Wikipedia
A probabilistic algorithm's behaviors depends on a random number generator. An algorithm that solves a problem in nondeterministic polynomial time can run ...
Read more >
Nondeterministic algorithm - YouTube
5-Linear Regression | Detailed Explanation on Linear Regression | ML for Non Tech · Elliptic Curves and Modular Forms, Chapter 2, Section 2...
Read more >
Methods for proving deterministic communication complexity ...
the "tiling method", which refers to determining the minimal number of monochromatic rectangles needed to cover all possible outputs. It is ...
Read more >
Learning Logs - Appalachian State University
For each numbered learning log, you can do either the reading learning log (if one is listed) or the reflective writing/problem solving learning...
Read more >
Generalized Nondeterminism and the Succinct ...
nondeterministic nite automata, and investigate their in uence on the succinct representation ... 6.1 Actual number vs theoretical bound on unary languages.
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