From 51f04d5ed459a87c77ac97b1e383431c46d5fb40 Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 20:10:20 +0200 Subject: [PATCH 01/10] adjust for beat deployment --- .github/workflows/build.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b49d9d1..3b38250 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ name: CI / CD -on: [push, pull_request] +on: [ push, pull_request ] jobs: build: @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: [ "3.7", "3.8", "3.9", "3.10" ] steps: - uses: actions/checkout@v3 @@ -16,22 +16,39 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip pip install pytest flake8 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest run: | pytest + - name: Build coverage file run: | coverage run -m pytest + - name: Upload Coverage to Codecov - uses: codecov/codecov-action@v2 \ No newline at end of file + uses: codecov/codecov-action@v2 + + - name: Publish distribution 📦 to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file From d740de14c30f6691bbe56355dd385ee9530675be Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 20:13:44 +0200 Subject: [PATCH 02/10] adjust for beat deployment --- .github/workflows/build.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b38250..7438750 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,21 @@ jobs: - name: Upload Coverage to Codecov uses: codecov/codecov-action@v2 + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@master with: From 732da67419657a721f76260b646d22cabaacbd44 Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 20:14:31 +0200 Subject: [PATCH 03/10] adjust for beat deployment --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7438750..6141bf5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,6 +55,7 @@ jobs: --sdist --wheel --outdir dist/ + . - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@master From 1e79cb60a006ed3534faa59be59b26686951756c Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 20:22:24 +0200 Subject: [PATCH 04/10] adjust for beat deployment --- LICENSE => LICENSE.txt | 0 setup.py | 10 ++++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) rename LICENSE => LICENSE.txt (100%) diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt diff --git a/setup.py b/setup.py index 9306eba..c70c53e 100644 --- a/setup.py +++ b/setup.py @@ -17,18 +17,24 @@ long_description_content_type="text/markdown", url="https://github.com/grobbles/SmartSignals", packages=["smart_signals"], + license='MIT', classifiers=[ - "Development Status :: 4 - Beta", + # How mature is this project? Common values are + # 3 - Alpha + # 4 - Beta + # 5 - Production/Stable + 'Development Status :: 3 - Alpha', "Intended Audience :: Developers", "Topic :: Communications", "Topic :: Utilities" - "License :: OSI Approved :: MIT License", + 'License :: OSI Approved :: MIT License', "Programming Language :: Python", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", ], + python_requires='>=3.7', keywords=["signals", "events", "slot", "qt"], install_requires=requirements ) From cff30995a7ccc88a2ee0e2dd90462af4a6722130 Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 20:43:23 +0200 Subject: [PATCH 05/10] adjust for beat deployment --- setup.py | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/setup.py b/setup.py index c70c53e..5ac24ea 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,25 @@ with open("requirements.txt", "r") as requirements_file: requirements.append(requirements_file.read()) +classifiers = [ + # How mature is this project? Common values are + # 1 - Planning + # 2 - Development + # 3 - Alpha + # 4 - Beta + # 5 - Production/Stable + 'Development Status :: 3 - Alpha', + "Intended Audience :: Developers", + "Topic :: Communications", + "Topic :: Utilities" + 'License :: OSI Approved :: MIT License', + "Programming Language :: Python", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", +] + setuptools.setup( name="SmartSignals", version="0.0.0", @@ -18,23 +37,8 @@ url="https://github.com/grobbles/SmartSignals", packages=["smart_signals"], license='MIT', - classifiers=[ - # How mature is this project? Common values are - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable - 'Development Status :: 3 - Alpha', - "Intended Audience :: Developers", - "Topic :: Communications", - "Topic :: Utilities" - 'License :: OSI Approved :: MIT License', - "Programming Language :: Python", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - ], + classifiers=classifiers, python_requires='>=3.7', - keywords=["signals", "events", "slot", "qt"], + keywords=["smart_signals", "SmartSignals", "signals", "events", "slot", "qt"], install_requires=requirements ) From 395261eea16c4e9ee8f99af4b0fafd1119d7ac53 Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 20:48:13 +0200 Subject: [PATCH 06/10] adjust for beat deployment --- LICENSE.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index d9c139c..352df39 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,3 @@ -The MIT License (MIT) - Copyright (c) 2022 Uwe Roder Permission is hereby granted, free of charge, to any person obtaining a copy From ffd465d506da1e89dafd6934a7086b408550c4b6 Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 20:50:14 +0200 Subject: [PATCH 07/10] adjust for beat deployment --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5ac24ea..55e1739 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ "Intended Audience :: Developers", "Topic :: Communications", "Topic :: Utilities" - 'License :: OSI Approved :: MIT License', + # 'License :: OSI Approved :: MIT License', "Programming Language :: Python", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", From 1f33a09d8c5125e7f57a678521e662823a6fe023 Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 20:53:30 +0200 Subject: [PATCH 08/10] adjust for beat deployment --- setup.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 55e1739..71800c3 100644 --- a/setup.py +++ b/setup.py @@ -7,19 +7,19 @@ with open("requirements.txt", "r") as requirements_file: requirements.append(requirements_file.read()) -classifiers = [ # How mature is this project? Common values are # 1 - Planning # 2 - Development # 3 - Alpha # 4 - Beta # 5 - Production/Stable - 'Development Status :: 3 - Alpha', - "Intended Audience :: Developers", - "Topic :: Communications", - "Topic :: Utilities" # 'License :: OSI Approved :: MIT License', - "Programming Language :: Python", + # 'Development Status :: 3 - Alpha', + # "Intended Audience :: Developers", + # "Topic :: Communications", + # "Topic :: Utilities" + # "Programming Language :: Python", +classifiers = [ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", From 11e3f8a013386acd475df62fce026758972be58c Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 21:13:34 +0200 Subject: [PATCH 09/10] adjust for beat deployment --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 71800c3..9ba08a4 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ url="https://github.com/grobbles/SmartSignals", packages=["smart_signals"], license='MIT', - classifiers=classifiers, + # classifiers=classifiers, python_requires='>=3.7', keywords=["smart_signals", "SmartSignals", "signals", "events", "slot", "qt"], install_requires=requirements From e53d78cd8b458f1c0af3bb1adde11df5ece9c66d Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 21:23:18 +0200 Subject: [PATCH 10/10] adjust for beat deployment --- .github/workflows/release.yml | 72 +++++++++++++++++++++++ .github/workflows/{build.yml => test.yml} | 8 +-- 2 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/release.yml rename .github/workflows/{build.yml => test.yml} (89%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d70b90f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,72 @@ +name: CI / CD + +on: + push: + branches: + - main + - release + +jobs: + build-and-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest flake8 + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + + - name: Test with pytest + run: | + pytest + + - name: Build coverage file + run: | + coverage run -m pytest + + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v2 + + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + + - name: Publish distribution 📦 to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + skip_existing: true + + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} + skip_existing: true \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/test.yml similarity index 89% rename from .github/workflows/build.yml rename to .github/workflows/test.yml index 6141bf5..a21ce34 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/test.yml @@ -62,9 +62,5 @@ jobs: with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ - - - name: Publish distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + skip_existing: true + verbose: true