Github action docs is falling because of no module named nbsphinx error
- User
Github action docs is falling because of no module named nbsphinx error
Assistant
Let me analyze the documentation build issue based on the provided repository files.
The error "no module named nbsphinx" suggests there's a dependency installation problem in the GitHub Actions workflow. Looking at the files, I can see a few relevant points:
-
The docs.yml workflow file shows that documentation is being built using Poetry, but there might be an issue with how the dependencies are being installed.
-
The project has two different places where documentation requirements are specified:
- docs/requirements.txt which includes nbsphinx
- Poetry dependencies (though not directly shown in the provided files)
Here's what appears to be the issue:
The GitHub Actions workflow is using Poetry for installation (
poetry install -E all), but it might not be properly installing the documentation-specific requirements listed in docs/requirements.txt.To fix this, you have a few options:
- The simplest fix would be to modify the docs.yml workflow to explicitly install the docs requirements:
[Redacted- name: Install docs requirements run: pip install -r docs/requirements.txtAdd this step before the "make documentations" step.
- Alternatively, ensure these dependencies are properly included in your Poetry configuration (pyproject.toml file, which wasn't provided in the context).
The current workflow seems to be missing the explicit installation of documentation dependencies, even though they're listed in docs/requirements.txt. The nbsphinx package is required since it's listed in docs/conf.py as one of the extensions:
pythonextensions = [ ... "nbsphinx", "nbsphinx_link", ... ]I recommend implementing the first solution as it's the most straightforward fix for this specific error.
-