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
{{ message }}
Repository navigation
[DOCS] Adding raw directive to README.rst fails twine check #58727
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.
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.
Activity
ScriptAutomate commentedon Oct 13, 2020
I'll be working on this.
ScriptAutomate commentedon Oct 13, 2020
Running the following before building/packaging for PyPi would strip the portion of the
README.rstthat PyPi would not support, being the.. raw::directive that is rendering the HTML currently seen:sed -i -n '/^About\ Salt$/,$p' README.rstIf automated testing is added with something like
twine check, then this command would need to be ran beforehand in order to prepare theREADME.rstproperly. This allows the more detailedREADME.rstto exist as seen on GitHub, and for the stripped down version to exist on PyPi.