python-holidays icon indicating copy to clipboard operation
python-holidays copied to clipboard

Add a test for pypi README syntax validation

Open arkid15r opened this issue 2 years ago • 1 comments

Based on failed deploy

Checking dist/holidays-0.20-py3-none-any.whl: FAILED
ERROR    `long_description` has syntax errors in markup and would not be        
         rendered on PyPI.                                                      
         line 515: Error: Unknown interpreted text role "py:attr".              
Checking dist/holidays-0.[20](https://github.com/dr-prodigy/python-holidays/actions/runs/4255685517/jobs/7403860606#step:7:21).tar.gz: FAILED
ERROR    `long_description` has syntax errors in markup and would not be        
         rendered on PyPI.                                                      
         line 515: Error: Unknown interpreted text role "py:attr".

arkid15r avatar Feb 23 '23 19:02 arkid15r

You can specify the testPyPI with the action that you are currently using

- name: Publish package distributions to TestPyPI
  uses: pypa/gh-action-pypi-publish@release/v1
  with:
    repository-url: https://test.pypi.org/legacy/

See example in the readme

Here is an example in action which include a test download from that index: https://github.com/pymc-labs/pymc-marketing/blob/5897d939d44d7d31fb2c6c1c45fbd87758e64565/.github/workflows/pypi.yml?plain=1#L59-L62

williambdean avatar Jul 15 '25 20:07 williambdean