Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Read the Docs automodule not working properly #2

Closed
sbslee opened this issue Apr 21, 2021 · 2 comments
Closed

[DOC] Read the Docs automodule not working properly #2

sbslee opened this issue Apr 21, 2021 · 2 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@sbslee
Copy link
Owner

sbslee commented Apr 21, 2021

I noticed that automodule is working fine with the make html command, but it fails to render when built by Read The Docs on the web. This issue is most likely related to this issue. When I looked at the build in Read The Docs, I found this message:

Running Sphinx v3.5.4
loading translations [en]... done
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 5 source files that are out of date
updating environment: [new config] 5 added, 0 changed, 0 removed
reading sources... [ 20%] api
reading sources... [ 40%] changelog
reading sources... [ 60%] cli
reading sources... [ 80%] index
reading sources... [100%] readme

WARNING: autodoc: failed to import module 'api.BedFrame' from module 'fuc'; the following exception was raised:
No module named 'fuc'
WARNING: autodoc: failed to import module 'api.FastqFrame' from module 'fuc'; the following exception was raised:
No module named 'fuc'
WARNING: autodoc: failed to import module 'api.VcfFrame' from module 'fuc'; the following exception was raised:
No module named 'fuc'
WARNING: autodoc: failed to import module 'api.common' from module 'fuc'; the following exception was raised:
No module named 'fuc'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 20%] api
writing output... [ 40%] changelog
writing output... [ 60%] cli
writing output... [ 80%] index
writing output... [100%] readme

generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 4 warnings.

The HTML pages are in _build/html.
Updating searchtools for Read the Docs search...
@sbslee sbslee added bug Something isn't working documentation Improvements or additions to documentation labels Apr 21, 2021
@sbslee
Copy link
Owner Author

sbslee commented Apr 21, 2021

Two of the four warnings disappeared when I updated the conf.py file to include the following (a7a9806):

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.

import os
import sys
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../'))

Two warnings still remain:

Running Sphinx v3.5.4
loading translations [en]... done
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 5 source files that are out of date
updating environment: [new config] 5 added, 0 changed, 0 removed
reading sources... [ 20%] api
reading sources... [ 40%] changelog
reading sources... [ 60%] cli
reading sources... [ 80%] index
reading sources... [100%] readme

WARNING: autodoc: failed to import module 'BedFrame' from module 'fuc.api'; the following exception was raised:
No module named 'pandas'
WARNING: autodoc: failed to import module 'VcfFrame' from module 'fuc.api'; the following exception was raised:
No module named 'pandas'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 20%] api
writing output... [ 40%] changelog
writing output... [ 60%] cli
writing output... [ 80%] index
writing output... [100%] readme

generating indices... genindex py-modindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 2 warnings.

The HTML pages are in _build/html.
Updating searchtools for Read the Docs search...

@sbslee
Copy link
Owner Author

sbslee commented Apr 21, 2021

The remaining warnings disappeared when I updated the conf.py file to include the following (697e00c):

autodoc_mock_imports = [
    'numpy',
    'pandas',
    'pyranges'
]

@sbslee sbslee closed this as completed Apr 21, 2021
@sbslee sbslee changed the title Read The Docs automodule not working properly Read the Docs automodule not working properly Apr 21, 2021
@sbslee sbslee changed the title Read the Docs automodule not working properly Read the Docs automodule extension not working properly Apr 21, 2021
@sbslee sbslee changed the title Read the Docs automodule extension not working properly Read the Docs automodule not working properly Apr 21, 2021
@sbslee sbslee changed the title Read the Docs automodule not working properly [DOC] Read the Docs automodule not working properly Jun 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant