From 4e377677a885b8e92d8c10adc3f0d057cb07f241 Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Sun, 18 Jun 2023 14:22:28 +0200 Subject: [PATCH 1/4] Solve twine warning (venv) PS C:\...\pvlib-python> py -m twine check dist/* Checking dist\pvlib-0.9.6.dev25+g763dd0a.d20230618-py3-none-any.whl: PASSED with warnings WARNING `long_description_content_type` missing. defaulting to `text/x-rst`. Checking dist\pvlib-0.9.6.dev25+g763dd0a.d20230618.tar.gz: PASSED with warnings WARNING `long_description_content_type` missing. defaulting to `text/x-rst`. --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 6e25d097da..3ec6da3ea7 100755 --- a/setup.py +++ b/setup.py @@ -27,6 +27,7 @@ Source code: https://github.com/pvlib/pvlib-python """ +LONG_DESCRIPTION_CONTENT_TYPE = "text/plain" DISTNAME = 'pvlib' LICENSE = 'BSD 3-Clause' @@ -120,6 +121,7 @@ ext_modules=extensions, description=DESCRIPTION, long_description=LONG_DESCRIPTION, + long_description_content_type=LONG_DESCRIPTION_CONTENT_TYPE, author=AUTHOR, maintainer_email=MAINTAINER_EMAIL, license=LICENSE, From f55643f07f0c20ba37c65f56900f6e62fdb95332 Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Fri, 7 Jul 2023 11:16:37 +0200 Subject: [PATCH 2/4] Add metadata verification to publish.yml --- .github/workflows/publish.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fb1f3366c9..1b3ab6aea7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,10 +32,16 @@ jobs: - name: Build packages run: python -m build + - name: Check metadata verification + run: python -m twine check dist/* + # only publish distribution to PyPI for tagged commits - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags/v') uses: pypa/gh-action-pypi-publish@release/v1 with: + # do not run twine check by default + # to avoid duplicated output + verify-metadata: false user: __token__ - password: ${{ secrets.pypi_password }} \ No newline at end of file + password: ${{ secrets.pypi_password }} From 1a5aff7d4ce941dd16bedb76bb80fe555159f88b Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Fri, 7 Jul 2023 11:19:48 +0200 Subject: [PATCH 3/4] Add twine to build tools --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1b3ab6aea7..869cbb7cda 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,6 +28,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install build + python -m pip install twine - name: Build packages run: python -m build From f6705a00a0b23362cb18fe9b8af5e18d9ca7c4be Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Sat, 8 Jul 2023 16:42:27 +0200 Subject: [PATCH 4/4] code review Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com> --- .github/workflows/publish.yml | 5 +---- setup.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 869cbb7cda..a23dfedc4f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,15 +34,12 @@ jobs: run: python -m build - name: Check metadata verification - run: python -m twine check dist/* + run: python -m twine check --strict dist/* # only publish distribution to PyPI for tagged commits - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags/v') uses: pypa/gh-action-pypi-publish@release/v1 with: - # do not run twine check by default - # to avoid duplicated output - verify-metadata: false user: __token__ password: ${{ secrets.pypi_password }} diff --git a/setup.py b/setup.py index 3ec6da3ea7..52c5bdd731 100755 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ Source code: https://github.com/pvlib/pvlib-python """ -LONG_DESCRIPTION_CONTENT_TYPE = "text/plain" +LONG_DESCRIPTION_CONTENT_TYPE = "text/x-rst" DISTNAME = 'pvlib' LICENSE = 'BSD 3-Clause'