You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Config file: make sphinx or mkdocs configuration required for projects using Sphinx or MkDocs (#11852)
- This introduces a breaking change for users overriding the new
(undocumented) jobs (create_environment, install, build.html and
friends). This is, if they have overridden any of those jobs without
explicitly declaring a Sphinx or MkDocs key, we will no longer run the
sphinx/mkdocs commands, not their setup.
- This hardcodes the dates from
readthedocs/website#342 to through an error to
users using the configuration file without an explicit sphinx/mkdocs
configuration.
This allows for users to keep using the new overrides without worrying
about sphinx/mkdocs, while giving enough time to old users to migrate
their projects to give an explicit path.
### Some notes
- We are allowing to use sphinx/mkdocs and probably other keys with
build.commands, even if those keys don't affect the build in anything.
Not really something that "interrupt" users in any way, but it can be
missleading.
- A next step should be to not make python required at all, right now we
still create a virtual environment. We probably want to create a virtual
env only if python was provided in the list of build.tools.
----
- Ref: readthedocs/website#342
- Closes#10637
- Closes#11819
- Closes#11810
- Closes#11216
---------
Co-authored-by: Manuel Kaufmann <[email protected]>
Copy file name to clipboardExpand all lines: readthedocs/config/notifications.py
+26
Original file line number
Diff line number
Diff line change
@@ -361,5 +361,31 @@
361
361
),
362
362
type=ERROR,
363
363
),
364
+
Message(
365
+
id=ConfigError.SPHINX_CONFIG_MISSING,
366
+
header=_("Missing Sphinx configuration key"),
367
+
body=_(
368
+
textwrap.dedent(
369
+
"""
370
+
The <code>sphinx.configuration</code> key is missing.
371
+
This key is now required, see our <a href="https://about.readthedocs.com/blog/2024/12/deprecate-config-files-without-sphinx-or-mkdocs-config/">blog post</a> for more information.
372
+
"""
373
+
).strip(),
374
+
),
375
+
type=ERROR,
376
+
),
377
+
Message(
378
+
id=ConfigError.MKDOCS_CONFIG_MISSING,
379
+
header=_("Missing MkDocs configuration key"),
380
+
body=_(
381
+
textwrap.dedent(
382
+
"""
383
+
The <code>mkdocs.configuration</code> key is missing.
384
+
This key is now required, see our <a href="https://about.readthedocs.com/blog/2024/12/deprecate-config-files-without-sphinx-or-mkdocs-config/">blog post</a> for more information.
0 commit comments