Skip to content

[DOCS] Adding raw directive to README.rst fails twine check #58727

Closed

Description

@ScriptAutomate

Description

The #58666 PR introduced a facelift to the README.rst that fails twine check attempts to upload to PyPi. PyPi does not allow for the raw directive in rst files for security purposes.

Suggested Fix

One of two paths:

  • Stay with reStructuredText, but use other directives such as image when able to provide similar look.
  • Transition over to Markdown instead of reStructuredText. PyPi seems to be completely fine with markdown.

Either way, this repository should add something like twine check to the test automation pipeline in order to catch problems like these at the PR level. I'll create a separate issue for this, and update this ticket.

Type of documentation

Salt documentation: README.rst

Location or format of documentation

https://github.com/saltstack/salt/blob/master/README.rst

Activity

  1. added
    documentation
    on Oct 13, 2020
  2. ScriptAutomate commented on Oct 13, 2020

    @ScriptAutomate
    ContributorAuthor

    I'll be working on this.

  3. ScriptAutomate commented on Oct 13, 2020

    @ScriptAutomate
    ContributorAuthor

    Running the following before building/packaging for PyPi would strip the portion of the README.rst that PyPi would not support, being the .. raw:: directive that is rendering the HTML currently seen:

    sed -i -n '/^About\ Salt$/,$p' README.rst

    If automated testing is added with something like twine check, then this command would need to be ran beforehand in order to prepare the README.rst properly. This allows the more detailed README.rst to exist as seen on GitHub, and for the stripped down version to exist on PyPi.

  4. added this to the Approved milestone on Oct 14, 2020
  5. added
    bug
    on Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugdocumentation

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions