LabSid-USP/RUBEM

Fix Read the Docs Sphinx build

soaressgabriel opened this issue · 0 comments

Describe the bug

  • Read the Docs failed to build the Sphinx documentation because #118.

To Reproduce

Steps to reproduce the behavior:

  1. Read the Docs tries to build our Sphinx doc;

  2. See error:

    Running Sphinx v7.2.6
    [autosummary] generating autosummary for: api.rst, changelog.rst, code-of-conduct.rst, datasets.rst, faq.rst, fileformats.rst, generated/rubem.core.Model.rst, generated/rubem.core.rst, index.rst, installation.rst, license.rst, overview.rst, preprocessing.rst, support.rst, team.rst, tutorials.rst, userguide.rst
    WARNING: Failed to import rubem.core.
    Possible hints:
    * ModuleNotFoundError: No module named 'humanize'
    * AttributeError: module 'rubem' has no attribute 'core'
    WARNING: [autosummary] failed to import rubem.core.
    Possible hints:
    * ModuleNotFoundError: No module named 'humanize'
    * AttributeError: module 'rubem' has no attribute 'core'
    * ImportError: 
    
    Traceback (most recent call last):
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/ext/autosummary/generate.py", line 503, in generate_autosummary_docs
        name, obj, parent, modname = import_by_name(entry.name)
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/ext/autosummary/__init__.py", line 655, in import_by_name
        raise ImportExceptionGroup('no module named %s' % ' or '.join(tried), exceptions)
    sphinx.ext.autosummary.ImportExceptionGroup: no module named rubem.core.Model
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/events.py", line 97, in emit
        results.append(listener.handler(self.app, *args))
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/ext/autosummary/__init__.py", line 814, in process_generate_options
        generate_autosummary_docs(genfiles, suffix=suffix, base_path=app.srcdir,
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/ext/autosummary/generate.py", line 508, in generate_autosummary_docs
        name, obj, parent, modname = import_ivar_by_name(entry.name)
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/ext/autosummary/__init__.py", line 712, in import_ivar_by_name
        real_name, obj, parent, modname = import_by_name(name, prefixes)
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/ext/autosummary/__init__.py", line 655, in import_by_name
        raise ImportExceptionGroup('no module named %s' % ' or '.join(tried), exceptions)
    sphinx.ext.autosummary.ImportExceptionGroup: no module named rubem.core
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/cmd/build.py", line 293, in build_main
        app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/application.py", line 272, in __init__
        self._init_builder()
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/application.py", line 343, in _init_builder
        self.events.emit('builder-inited')
      File "/home/docs/checkouts/readthedocs.org/user_builds/rubem/envs/latest/lib/python3.9/site-packages/sphinx/events.py", line 108, in emit
        raise ExtensionError(__("Handler %r for event %r threw an exception") %
    sphinx.errors.ExtensionError: Handler <function process_generate_options at 0x7f1e6c294d30> for event 'builder-inited' threw an exception (exception: no module named rubem.core)
    
    Extension error (sphinx.ext.autosummary):
    Handler <function process_generate_options at 0x7f1e6c294d30> for event 'builder-inited' threw an exception (exception: no module named rubem.core)
    Command time: 0s Return: 2

Expected behavior

  • Read the Docs must build the Sphinx documentation without any errors.

Screenshots

  • N/A

System information

Additional context

  • N/A