Skip to content

Resolve "Let Sphinx raise an error if there were warnings during the build"

This MR aims to make writing and maintaining the documentation more robust.

For that aim, it is vital to be able to detect errors in the documentation. This MR thus configures Sphinx to make these errors more easily visible (by failing the build job) and be able to inspect them more easily by adjusting the CI and the job artifacts accordingly.

This MR also cleans up all the previously generated sphinx warnings that led to bad formatting, wrong or dead references, and other errors.

Can this MR be accepted?

  • Improved Sphinx configuration
    • now exiting with non-zero exit status when warnings were generated
    • errors are written to doc/build_errors.log
    • choose nitpicky mode
    • add .nitpicky-ignore to filter out types that cannot be referenced
  • Improved CI:
    • Let build:docs have allow_failure flag set, thus showing a sign when there were sphinx warnings
    • Add no-op job that allows to start build:docs job earlier (brings CI time down by about 30% to ~110s)
    • Expose sphinx error log as build artifact
  • Cleaned up reference warnings and other warnings in documentation and docstrings
  • Minor docstring improvements here and there
  • Tests added or adjusted
  • Checked code coverage on new and adjusted code (no code changes)
  • Pipeline passes
  • History cleaned-up (do NOT squash)
  • Changelog entry added
  • Version number bumped to 0.12.0a0
  • Approved by @herdeanu

Related

Closes #124 (closed)

Meta task: #117 (closed)

Edited by Utopia Developers

Merge request reports

Loading