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

Missing sphinx_rtd_theme required by default when appending docs/conf.py #10626

Closed
cedk opened this issue Aug 12, 2023 · 15 comments · Fixed by #10638
Closed

Missing sphinx_rtd_theme required by default when appending docs/conf.py #10626

cedk opened this issue Aug 12, 2023 · 15 comments · Fixed by #10638
Assignees
Labels
Needed: design decision A core team decision is required

Comments

@cedk
Copy link
Contributor

cedk commented Aug 12, 2023

Details

Expected Result

As auto-created readthedocs.org specific configuration define 'sphinx_rtd_theme' as html_theme, it is expected that it install the required dependencies.
It was doing it until few days.

Actual Result

The build fails because of:

Theme error:
no theme named 'sphinx_rtd_theme' found (missing theme.conf?)
@witolddebski
Copy link

I added "sphinx_rtd_theme" in requirements.txt and it solved the issue. Please also mind that you need to add reference to requirements.txt in .readthedocs.yaml as follows (it is commented out by default):

python:
  install:
    - requirements: requirements.txt

@cedk
Copy link
Contributor Author

cedk commented Aug 12, 2023

Indeed but we should not have to maintain the dependencies of the default theme.conf.

@jayunit100
Copy link

seeing this as well...

@jayunit100
Copy link

jayunit100 commented Aug 12, 2023

making output directory... done
...
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
    self.theme = theme_factory.create(themename)
...
sphinx.errors.ThemeError: no theme named 'sphinx_rtd_theme' found (missing theme.conf?)
...
no theme named 'sphinx_rtd_theme' found (missing theme.conf?)

@jayunit100
Copy link

jayunit100 commented Aug 12, 2023

ok, followed the above hint... and it gets further after adding the sphinx_rtd_theme to requirements.txt... but now i see

.. autosummary::
   :toctree: generated
...
ERROR: Unknown directive type "autofunction".
...
ERROR: Unknown directive type "autoexception".
.. autoexception:: lumache.InvalidKindError
...
Sphinx error:
root file /home/docs/checkouts/readthedocs.org/user_builds/storyworld0/checkouts/latest/docs/index.rst not found

@stsewd
Copy link
Member

stsewd commented Aug 14, 2023

Hi, for new projects we aren't installing the RTD nor other libs by default, see https://blog.readthedocs.com/python-core-requirements-changed/. We recommend that your project installs the proper dependencies explicitly.

@stsewd stsewd closed this as completed Aug 14, 2023
@cedk
Copy link
Contributor Author

cedk commented Aug 14, 2023

But the default conf.py is using sphinx_rtd_theme so it should be installed by default.
The minimal requirement provided on https://blog.readthedocs.com/migrate-configuration-v2/#adding-a-configuration-file does not set sphinx_rtd_theme as requirements.
As long as the appended configuration push sphinx_rtd_theme as dependency, it should be installed by default.

@humitos
Copy link
Member

humitos commented Aug 14, 2023

@cedk the default conf.py file is deprecated as well and it will be removed soon. See https://blog.readthedocs.com/doctool-without-configuration-file/

This issue is a temporal inconsistency, but I'll be removed once the date arrives 😊

1 similar comment
@humitos
Copy link
Member

humitos commented Aug 14, 2023

@cedk the default conf.py file is deprecated as well and it will be removed soon. See https://blog.readthedocs.com/doctool-without-configuration-file/

This issue is a temporal inconsistency, but I'll be removed once the date arrives 😊

@cedk
Copy link
Contributor Author

cedk commented Aug 14, 2023

I mean the part that is added automatically to the conf.py. In my case I have a conf.py.
What will then happen to my build?

@humitos
Copy link
Member

humitos commented Aug 16, 2023

@cedk

I mean the part that is added automatically to the conf.py. In my case I have a conf.py.

Hrm... that's a good point. I will re-open this issue for now.

What will then happen to my build?

If you define the html_theme in your conf.py it should not be overwritten by Read the Docs.

@humitos humitos reopened this Aug 16, 2023
@humitos humitos changed the title Missing sphinx_rtd_theme Missing sphinx_rtd_theme required by default when appending docs/conf.py Aug 16, 2023
@humitos humitos added the Needed: design decision A core team decision is required label Aug 16, 2023
@cedk
Copy link
Contributor Author

cedk commented Aug 16, 2023

What will then happen to my build?

If you define the html_theme in your conf.py it should not be overwritten by Read the Docs.

Agree but if I do not, what is the html_theme that will be used in the furture? If it is sphinx_rtd_theme, I think it should be installed automatically.

@humitos
Copy link
Member

humitos commented Aug 16, 2023

what is the html_theme that will be used in the furture?

I opened a PR that removes this auto-configure the Read the Docs theme already at #10638. We need to coordinate how to deploy it now to avoid breaking existing projects.

@tkoskela
Copy link

The tutorial template is failing the first build with this error for me

humitos added a commit that referenced this issue Aug 16, 2023
- `.readthedocs.yaml` config file is now required
- `sphinx-rtd-theme` is a required dependency and has to be installed via
  `python.install.requirements`
- remove invalid options from "Import Project" page
- comment out section about "Show warning banner"

Related #10626 (comment)
humitos added a commit that referenced this issue Aug 16, 2023
- `.readthedocs.yaml` config file is now required
- `sphinx-rtd-theme` is a required dependency and has to be installed via
  `python.install.requirements`
- remove invalid options from "Import Project" page
- comment out section about "Show warning banner"

* Related: #10626 (comment)
* Requires: readthedocs/tutorial-template#52
humitos added a commit that referenced this issue Aug 16, 2023
- `.readthedocs.yaml` config file is now required
- `sphinx-rtd-theme` is a required dependency and has to be installed via
  `python.install.requirements`
- remove invalid options from "Import Project" page
- comment out section about "Show warning banner"

* Related: #10626 (comment)
* Requires: readthedocs/tutorial-template#52
humitos added a commit that referenced this issue Aug 17, 2023
* Docs: update tutorial with the latest required changes

- `.readthedocs.yaml` config file is now required
- `sphinx-rtd-theme` is a required dependency and has to be installed via
  `python.install.requirements`
- remove invalid options from "Import Project" page
- comment out section about "Show warning banner"

* Related: #10626 (comment)
* Requires: readthedocs/tutorial-template#52

* Docs: update screenshot

* Docs: the page is called Admin

* Docs: remove note about requiring a YAML file
@jpmckinney
Copy link

#10638 introduced a bug, that I reported in that PR.

@humitos humitos self-assigned this Aug 26, 2023
tkeskita added a commit to tkeskita/BVtkNodes that referenced this issue Oct 15, 2023
- Doc building at readthedocs have been failing for a few months due
  to their change in configuration:
  readthedocs/readthedocs.org#10626
  Now trying to set up readthedocs building similar to:
  https://github.com/readthedocs/tutorial-template
tkeskita added a commit to tkeskita/snappyhexmesh_gui that referenced this issue Oct 15, 2023
- Readthedocs building has been failing due to their change:
  readthedocs/readthedocs.org#10626
  Committing readthedocs setup similar to tutorial example:
  https://github.com/readthedocs/tutorial-template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants