Skip to content

DOC: Use a standard header for all rst files #23952

Closed
@datapythonista

Description

@datapythonista

When we build the documentation from the .rst files in doc/source/, we use a variable common_imports that is added as context for sphinx, and that is used in the whatsnew files.

But more or less the same imports and options that are used in the whatsnew files, are used in most .rst files.

What would be useful is:

  • Rename common_imports to header, as this will be used for other things in the future (like defining tocdepth)
  • Add it at the beginning of all the .rst files in the same way as it's done for the whatsnew files
  • Remove the equivalent code already at the beginning of the files
  • If there is anything that would be useful to add to the content of common_imports (because it's used in many files), add it

This can have implications on the flake8-rst validation, as I assume the content is validated before rendering, and the imports will be missing during the validation.

CC: @TomAugspurger @FHaase

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions