From 90fa7ec495ce58e1096764a6ed0dc4d8c99af1d7 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 8 Jan 2025 12:11:47 -0800 Subject: [PATCH 1/9] Update setup.cfg - drop support for 3.9 - add support for 3.13 --- setup.cfg | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9b0fd7a..1fb7bab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ description-file = README.md license_files = LICENSE name = purpleair_api -version = 1.2.0 +version = 1.3.0 author = Carlos Santos author_email = dose.lucky.sake@cloak.id license = MIT @@ -20,6 +20,10 @@ long_description_content_type = text/markdown platforms = Windows 32/64, Linux 32/64, MacOS 32/64 [options] -python_requires = >=3.8 packages = purpleair_api -install_requires = requests \ No newline at end of file +install_requires = requests +python_requires = >=3.9,<3.14 + +[tool:black] +line-length = 100 +target-version = ['py39', 'py310', 'py311', 'py312', 'py313'] \ No newline at end of file From e40d45e87aa1364d2ee352649ab7ff552d5de564 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 8 Jan 2025 12:12:50 -0800 Subject: [PATCH 2/9] V1.3.0 - updating refs from 1.2.0 --> 1.3.0 --- README.md | 2 +- sphinx_docs_build/source/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 17e489e..87e0302 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ To use the PurpleAirAPI (PAA) api keys are required. You can get API keys by sen | [![PyPI Distributions](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/build_and_publish_to_pypi.yml/badge.svg)](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/build_and_publish_to_pypi.yml) | [![TestPyPI Distributions](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/build_and_publish_to_test_pypi.yml/badge.svg)](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/build_and_publish_to_test_pypi.yml) | [![Black](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/black.yml/badge.svg)](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/black.yml) | | --------------- | --------------- | --------------- | -| [![Tests](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/tests.yml) | [![total download count](https://img.shields.io/github/downloads/carlkidcrypto/purpleair_api/total.svg?style=flat-square&label=all%20downloads)](https://github.com/carlkidcrypto/purpleair_api/releases) | [![latest release download count](https://img.shields.io/github/downloads/carlkidcrypto/purpleair_api/v1.2.0/total.svg?style=flat-square)](https://github.com/carlkidcrypto/purpleair_api/releases/tag/v1.2.0) | +| [![Tests](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/carlkidcrypto/purpleair_api/actions/workflows/tests.yml) | [![total download count](https://img.shields.io/github/downloads/carlkidcrypto/purpleair_api/total.svg?style=flat-square&label=all%20downloads)](https://github.com/carlkidcrypto/purpleair_api/releases) | [![latest release download count](https://img.shields.io/github/downloads/carlkidcrypto/purpleair_api/v1.3.0/total.svg?style=flat-square)](https://github.com/carlkidcrypto/purpleair_api/releases/tag/v1.3.0) | | --------------- | --------------- | --------------- | ## How to Support This Project diff --git a/sphinx_docs_build/source/conf.py b/sphinx_docs_build/source/conf.py index 591a09e..f47fe5c 100644 --- a/sphinx_docs_build/source/conf.py +++ b/sphinx_docs_build/source/conf.py @@ -23,7 +23,7 @@ author = "carlkidcrypto" # The full version, including alpha/beta/rc tags -release = "V1.2.0" +release = "V1.3.0" # -- General configuration --------------------------------------------------- From c5bfc555e4c1834c56f094e75cb2752ba6df4bd5 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 8 Jan 2025 12:20:13 -0800 Subject: [PATCH 3/9] Python Versions - bumping 3.10 --> 3.11 - adding a matrix for tests --- .github/workflows/build_and_publish_to_pypi.yml | 4 ++-- .github/workflows/build_and_publish_to_test_pypi.yml | 4 ++-- .github/workflows/sphinx_build.yml | 4 ++-- .github/workflows/tests.yml | 11 ++++++++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_and_publish_to_pypi.yml b/.github/workflows/build_and_publish_to_pypi.yml index aeeaed3..084f4d1 100644 --- a/.github/workflows/build_and_publish_to_pypi.yml +++ b/.github/workflows/build_and_publish_to_pypi.yml @@ -14,10 +14,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - name: Install pypa/build run: >- diff --git a/.github/workflows/build_and_publish_to_test_pypi.yml b/.github/workflows/build_and_publish_to_test_pypi.yml index a596a43..e9933de 100644 --- a/.github/workflows/build_and_publish_to_test_pypi.yml +++ b/.github/workflows/build_and_publish_to_test_pypi.yml @@ -32,10 +32,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - name: Install pypa/build run: >- diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index 9c4f481..7152af5 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -33,10 +33,10 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - - name: Set up Python 3.10 env for sphinx... + - name: Set up Python 3.11 env for sphinx... uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - name: Install python3/os requirements... uses: carlkidcrypto/os-specific-runner@v2.1.1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fb5efba..f93d6d2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,17 +28,22 @@ jobs: setup.cfg tests: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] needs: check-source-changes if: needs.check-source-changes.outputs.run_job == 'true' steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Set up Python 3.10 env for running unittest tests... + - name: Set up Python ${{ matrix.python-version }} env for running unittest tests... uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "${{ matrix.python-version }}" - name: Install python3 requirements... uses: carlkidcrypto/os-specific-runner@v2.1.1 From 4a200f7a9fffb8d42b0c1a82656e295384a28b1d Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 8 Jan 2025 12:22:44 -0800 Subject: [PATCH 4/9] Update tests.yml - try coverage on all platforms --- .github/workflows/tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f93d6d2..aa7dd7c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,8 +58,7 @@ jobs: - name: Run unit tests... uses: carlkidcrypto/os-specific-runner@v2.1.1 with: - linux: cd /home/runner/work/purpleair_api/purpleair_api/tests ; - coverage run -m unittest && coverage json ; + coverage run -m unittest && coverage json -o coverage_${{ matrix.os }}_${{ matrix.python-version }}.json ; - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 From 401ee20765bc387ac16d3fe1c6e932518b1b48d8 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 8 Jan 2025 12:28:26 -0800 Subject: [PATCH 5/9] Update tests.yml - run now? --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aa7dd7c..fbd1312 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,9 +58,11 @@ jobs: - name: Run unit tests... uses: carlkidcrypto/os-specific-runner@v2.1.1 with: - coverage run -m unittest && coverage json -o coverage_${{ matrix.os }}_${{ matrix.python-version }}.json ; + coverage run -m unittest && coverage json -o 'coverage_${{ matrix.os }}_${{ matrix.python-version }}.json' ; - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 + with: + files: coverage_*.json env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From 2f04117776644fcced8fc829732acdfb909bebcf Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 8 Jan 2025 12:32:14 -0800 Subject: [PATCH 6/9] Update tests.yml - use the with --- .github/workflows/tests.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fbd1312..8e8fa94 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,7 +58,12 @@ jobs: - name: Run unit tests... uses: carlkidcrypto/os-specific-runner@v2.1.1 with: - coverage run -m unittest && coverage json -o 'coverage_${{ matrix.os }}_${{ matrix.python-version }}.json' ; + linux: cd /home/runner/work/purpleair_api/purpleair_api/tests ; + coverage run -m unittest && coverage json -o coverage_linux_${{ matrix.os }}_${{ matrix.python-version }}.json ; + macos: cd /home/runner/work/purpleair_api/purpleair_api/tests ; + coverage run -m unittest && coverage json -o coverage_macos_${{ matrix.os }}_${{ matrix.python-version }}.json ; + windows: cd C:\Users\runneradmin\work\purpleair_api\purpleair_api\tests ; + coverage run -m unittest && coverage json -o coverage_windows_${{ matrix.os }}_${{ matrix.python-version }}.json ; - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 From e9e00d8c46e3def4c1b4723ca2b728d13625f814 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 8 Jan 2025 12:35:01 -0800 Subject: [PATCH 7/9] Update tests.yml - fix mac path --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8e8fa94..d980c1b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,7 +60,7 @@ jobs: with: linux: cd /home/runner/work/purpleair_api/purpleair_api/tests ; coverage run -m unittest && coverage json -o coverage_linux_${{ matrix.os }}_${{ matrix.python-version }}.json ; - macos: cd /home/runner/work/purpleair_api/purpleair_api/tests ; + macos: cd /Users/runner/work/purpleair_api/purpleair_api/tests ; coverage run -m unittest && coverage json -o coverage_macos_${{ matrix.os }}_${{ matrix.python-version }}.json ; windows: cd C:\Users\runneradmin\work\purpleair_api\purpleair_api\tests ; coverage run -m unittest && coverage json -o coverage_windows_${{ matrix.os }}_${{ matrix.python-version }}.json ; From d1c47cd7b16b85726135babdd35e0d734bf26fe5 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 8 Jan 2025 12:37:27 -0800 Subject: [PATCH 8/9] Update tests.yml - deps for all oses --- .github/workflows/tests.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d980c1b..a07b44d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,19 @@ jobs: - name: Install python3 requirements... uses: carlkidcrypto/os-specific-runner@v2.1.1 with: - linux: cd /home/runner/work/purpleair_api/purpleair_api/ ; + linux: cd /home/runner/work/purpleair_api/purpleair_api/ ; + python -m pip install --upgrade wheel ; + python -m pip install --upgrade setuptools ; + python -m pip install --upgrade pip ; + python -m pip install coverage ; + python -m pip install requests_mock ; + macos: cd /Users/runner/work/purpleair_api/purpleair_api/ ; + python -m pip install --upgrade wheel ; + python -m pip install --upgrade setuptools ; + python -m pip install --upgrade pip ; + python -m pip install coverage ; + python -m pip install requests_mock ; + windows: cd C:\Users\runneradmin\work\purpleair_api\purpleair_api\ ; python -m pip install --upgrade wheel ; python -m pip install --upgrade setuptools ; python -m pip install --upgrade pip ; From 33c568ee97c10f9d97bb0bdef33bffaabb724fc4 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 8 Jan 2025 12:40:16 -0800 Subject: [PATCH 9/9] Update tests.yml - fix windows path --- .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 a07b44d..2c49835 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,7 +60,7 @@ jobs: python -m pip install --upgrade pip ; python -m pip install coverage ; python -m pip install requests_mock ; - windows: cd C:\Users\runneradmin\work\purpleair_api\purpleair_api\ ; + windows: cd D:\a\purpleair_api\purpleair_api\ ; python -m pip install --upgrade wheel ; python -m pip install --upgrade setuptools ; python -m pip install --upgrade pip ; @@ -74,7 +74,7 @@ jobs: coverage run -m unittest && coverage json -o coverage_linux_${{ matrix.os }}_${{ matrix.python-version }}.json ; macos: cd /Users/runner/work/purpleair_api/purpleair_api/tests ; coverage run -m unittest && coverage json -o coverage_macos_${{ matrix.os }}_${{ matrix.python-version }}.json ; - windows: cd C:\Users\runneradmin\work\purpleair_api\purpleair_api\tests ; + windows: cd D:\a\purpleair_api\purpleair_api\tests ; coverage run -m unittest && coverage json -o coverage_windows_${{ matrix.os }}_${{ matrix.python-version }}.json ; - name: Upload coverage reports to Codecov