CEMeNT-PSAAP / MCDC

MC/DC: Monte Carlo Dynamic Code
https://mcdc.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
20 stars 20 forks source link

Documentation fails to build starting at #dc54a2b #177

Closed clemekay closed 5 months ago

clemekay commented 5 months ago

Documentation successfully builds at the previous commit, #9cb200f.

clemekay commented 5 months ago

Changes were made in #dc54a2b to mcdc/loop.py, mcdc/main.py, mcdc/print_.py, and mcdc/visualizer.py. Not immediately obvious to me why this would change the sphinx functionality at all. First exception raised:

sphinx.ext.autosummary.ImportExceptionGroup: no module named mcdc.IC_generator

clemekay commented 5 months ago

Sphinx was having issue the colorama import added to mcdc/print_.py. It's a documented issue with Sphinx's :autosummary: that when Sphinx runs into an import error, it'll print a "failed to import" warning for the outermost module attempting to import, not the actual import that failed: https://github.com/sphinx-doc/sphinx/issues/7989. Adding a mock directive for colorama in the conf.py file fixes the issue.