hhursev / recipe-scrapers

Python package for scraping recipes data
MIT License
1.6k stars 505 forks source link

README: repeated partial top-level domains (.co.uk) as hyperlink targets are invalid rST syntax #1157

Closed jayaddison closed 6 days ago

jayaddison commented 6 days ago

Pre-filing checks

...

The results you expect to see

During the release process to PyPi, the README.rst file is currently used for the long_description package metadata field - it can be provided as reStructuredText, as our README is, but it must also be considered syntactically valid.

We should expect the release process to succeed when the README.rst is syntactically valid.

The results (including any Python error messages) that you are seeing

A failed GitHub Actions workflow occurred during an attempt to release 14.57.0 recently, and the output logs from it include:

Checking dist/recipe_scrapers-14.57.0-py3-none-any.whl: FAILED
ERROR    `long_description` has syntax errors in markup and would not be        
         rendered on PyPI.                                                      
         line 90: Warning: Duplicate explicit target name: ".co.uk".   

Ref: https://github.com/hhursev/recipe-scrapers/actions/runs/9682217207/job/26714702799#step:6:21

jayaddison commented 6 days ago

The error can be replicated locally by using twine:

$ twine check dist/recipe_scrapers-14.57.0.tar.gz 
Checking dist/recipe_scrapers-14.57.0.tar.gz: FAILED
ERROR    `long_description` has syntax errors in markup and would not be rendered on PyPI.                                                                    
         line 90: Warning: Duplicate explicit target name: ".co.uk".
jayaddison commented 6 days ago

I think that the most straightforward resolution here would be to use anonymous reStructuredText hyperlinks for the top-level-domain variants.