From 8ec072b9c92277c16e7b2bf714ab583048694277 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Wed, 3 Jul 2024 15:21:00 +0100 Subject: [PATCH 1/4] Check distribution build --- .github/workflows/tests.yml | 23 +++++++++++++++++++++-- CHANGES.rst | 1 + 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9907ded7..979bee45 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -71,11 +71,29 @@ jobs: parallel-finished: true format: cobertura + test-distribution: + name: Check built package + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install wheel twine + - name: Build distribution files + run: python setup.py bdist_wheel sdist + - name: Check distribution files + run: twine check dist/* + deploy-tag-to-pypi: # only deploy on tags, see https://stackoverflow.com/a/58478262/1320237 if: startsWith(github.ref, 'refs/tags/v') needs: - run-tests + - test-distribution runs-on: ubuntu-latest # This environment stores the TWINE_USERNAME and TWINE_PASSWORD # see https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment @@ -92,7 +110,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.9" + python-version: "3.12" - name: Install dependencies run: | python -m pip install --upgrade pip @@ -133,7 +151,8 @@ jobs: # only deploy on tags, see https://stackoverflow.com/a/58478262/1320237 if: startsWith(github.ref, 'refs/tags/v') needs: - - run-tests + - run-tests + - test-distribution runs-on: ubuntu-latest environment: name: github-release diff --git a/CHANGES.rst b/CHANGES.rst index f9af3794..cec2b269 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -19,6 +19,7 @@ Minor changes: - Remove 4.x badge - Update list of ``tox`` environments - Use Coveralls' GitHub Action +- Check distribution in CI Breaking changes: From 503f8c4273aee89cb73243d51b46754aabc763ce Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Wed, 3 Jul 2024 15:24:12 +0100 Subject: [PATCH 2/4] add runs-on (required) --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 979bee45..48781f3e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,6 +73,7 @@ jobs: test-distribution: name: Check built package + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python From 5d54842d2a441ac38d52758e645a07daf3ea07af Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Wed, 3 Jul 2024 15:25:28 +0100 Subject: [PATCH 3/4] install setuptools --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 48781f3e..c38c32de 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -83,7 +83,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install wheel twine + pip install wheel twine setuptools - name: Build distribution files run: python setup.py bdist_wheel sdist - name: Check distribution files @@ -115,7 +115,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install wheel twine + pip install wheel twine setuptools - name: Check the tag run: | PACKAGE_VERSION=`python setup.py --version` From 39f9603d748bc215e98f7968ee77e01b3e8df3f8 Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Wed, 3 Jul 2024 15:50:47 +0100 Subject: [PATCH 4/4] Bump up rst heading --- README.rst | 12 ++++++------ setup.py | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 931f3246..3c7b2900 100644 --- a/README.rst +++ b/README.rst @@ -47,7 +47,7 @@ files. .. _`BSD`: https://github.com/collective/icalendar/issues/2 Quick start guide ------------------ +================= ``icalendar`` enables you to **create**, **inspect** and **modify** calendaring information with Python. @@ -58,7 +58,7 @@ To **install** the package, run:: Inspect Files -~~~~~~~~~~~~~ +------------- You can open an ``.ics`` file and see all the events:: @@ -74,7 +74,7 @@ You can open an ``.ics`` file and see all the events:: International Women's Day Modify Content -~~~~~~~~~~~~~~ +-------------- Such a calendar can then be edited and saved again. @@ -91,7 +91,7 @@ Such a calendar can then be edited and saved again. Create Events, TODOs, Journals, Alarms, ... -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------------------- ``icalendar`` supports the creation and parsing of all kinds of objects in the iCalendar (RFC 5545) standard. @@ -114,7 +114,7 @@ Have a look at `more examples `_. Use timezones of your choice -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +---------------------------- With ``icalendar``, you can localize your events to take place in different timezones. @@ -141,7 +141,7 @@ with the same result: END:VEVENT Version 6 with zoneinfo -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- Version 6 of ``icalendar`` switches the timezone implementation to ``zoneinfo``. This only affects you if you parse ``icalendar`` objects with ``from_ical()``. diff --git a/setup.py b/setup.py index 420690e3..016ce0d9 100644 --- a/setup.py +++ b/setup.py @@ -32,6 +32,7 @@ version=version, description=shortdesc, long_description=longdesc, + long_description_content_type="text/x-rst", classifiers=[ # https://pypi.python.org/pypi?%3Aaction=list_classifiers 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers',