From 0748d61593c67175457ed9b83d3e86402c5ac4b1 Mon Sep 17 00:00:00 2001 From: Jim Laney Date: Mon, 5 Feb 2024 08:38:18 -0800 Subject: [PATCH] add python version matrix to cicd tests (#106) Update python version , copyright, send coverage once --- .github/workflows/cicd.yml | 26 +++++++++++++------ restclients_core/cache.py | 2 +- restclients_core/dao.py | 2 +- restclients_core/exceptions.py | 2 +- restclients_core/models/__init__.py | 2 +- restclients_core/models/fields.py | 2 +- restclients_core/test.py | 2 +- .../tests/dao_implementation/test_backend.py | 2 +- .../tests/dao_implementation/test_live.py | 2 +- .../tests/dao_implementation/test_mock.py | 2 +- restclients_core/tests/models/test_base.py | 2 +- restclients_core/tests/models/test_clean.py | 2 +- .../tests/models/test_http_responses.py | 2 +- .../tests/models/test_model_string.py | 2 +- restclients_core/tests/test_local_cache.py | 2 +- restclients_core/tests/test_prometheus.py | 2 +- restclients_core/tests/test_thread.py | 2 +- restclients_core/tests/test_timing_log.py | 2 +- .../tests/util/test_decorators.py | 2 +- restclients_core/tests/util/test_mock.py | 2 +- restclients_core/tests/util/test_retry.py | 2 +- restclients_core/thread.py | 2 +- restclients_core/util/decorators.py | 2 +- restclients_core/util/local_cache.py | 2 +- restclients_core/util/mock.py | 2 +- restclients_core/util/performance.py | 2 +- restclients_core/util/retry.py | 2 +- setup.py | 3 +-- 28 files changed, 45 insertions(+), 36 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 43e5cb8..ca5bf41 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -24,6 +24,7 @@ name: tests env: APP_NAME: restclients_core + COVERAGE_PYTHON_VERSION: '3.10' on: push: @@ -37,22 +38,30 @@ on: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 + + strategy: + matrix: + python-version: + - '3.8' + - '3.9' + - '3.10' steps: - name: Checkout Repo uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v3 + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} + - name: Install Dependencies run: | python -m pip install --upgrade pip pip install -e . - pip install nose2 coverage coveralls==2.2.0 + pip install nose2 coverage coveralls==3.3.1 - name: Start Servers shell: bash @@ -76,6 +85,7 @@ jobs: coverage run ${APP_NAME}/test.py -v - name: Report Test Coverage + if: matrix.python-version == env.COVERAGE_PYTHON_VERSION env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash @@ -86,16 +96,16 @@ jobs: needs: test - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout Repo uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - name: Publish to PyPi uses: uw-it-aca/actions/publish-pypi@main diff --git a/restclients_core/cache.py b/restclients_core/cache.py index 363fe40..4624901 100644 --- a/restclients_core/cache.py +++ b/restclients_core/cache.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 diff --git a/restclients_core/dao.py b/restclients_core/dao.py index fc23f9e..2bdddf4 100644 --- a/restclients_core/dao.py +++ b/restclients_core/dao.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import random diff --git a/restclients_core/exceptions.py b/restclients_core/exceptions.py index 73cf400..92cf332 100644 --- a/restclients_core/exceptions.py +++ b/restclients_core/exceptions.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 diff --git a/restclients_core/models/__init__.py b/restclients_core/models/__init__.py index 290312f..d686115 100644 --- a/restclients_core/models/__init__.py +++ b/restclients_core/models/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import re diff --git a/restclients_core/models/fields.py b/restclients_core/models/fields.py index d5c9ae8..cf3e371 100644 --- a/restclients_core/models/fields.py +++ b/restclients_core/models/fields.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import datetime diff --git a/restclients_core/test.py b/restclients_core/test.py index 04ab1b5..8addea8 100644 --- a/restclients_core/test.py +++ b/restclients_core/test.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 # This is just a test runner for coverage diff --git a/restclients_core/tests/dao_implementation/test_backend.py b/restclients_core/tests/dao_implementation/test_backend.py index 96d9eed..449fa67 100644 --- a/restclients_core/tests/dao_implementation/test_backend.py +++ b/restclients_core/tests/dao_implementation/test_backend.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase, skipUnless diff --git a/restclients_core/tests/dao_implementation/test_live.py b/restclients_core/tests/dao_implementation/test_live.py index 65cfc64..fd6ff0e 100644 --- a/restclients_core/tests/dao_implementation/test_live.py +++ b/restclients_core/tests/dao_implementation/test_live.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase, skipUnless diff --git a/restclients_core/tests/dao_implementation/test_mock.py b/restclients_core/tests/dao_implementation/test_mock.py index 0030508..e9e6209 100644 --- a/restclients_core/tests/dao_implementation/test_mock.py +++ b/restclients_core/tests/dao_implementation/test_mock.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase, skipIf diff --git a/restclients_core/tests/models/test_base.py b/restclients_core/tests/models/test_base.py index 568b74b..a444f20 100644 --- a/restclients_core/tests/models/test_base.py +++ b/restclients_core/tests/models/test_base.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/restclients_core/tests/models/test_clean.py b/restclients_core/tests/models/test_clean.py index e53aea2..0bdd88d 100644 --- a/restclients_core/tests/models/test_clean.py +++ b/restclients_core/tests/models/test_clean.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/restclients_core/tests/models/test_http_responses.py b/restclients_core/tests/models/test_http_responses.py index be0632c..fe9f240 100644 --- a/restclients_core/tests/models/test_http_responses.py +++ b/restclients_core/tests/models/test_http_responses.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from restclients_core.models import CacheHTTP diff --git a/restclients_core/tests/models/test_model_string.py b/restclients_core/tests/models/test_model_string.py index 4e27d62..5483ac9 100644 --- a/restclients_core/tests/models/test_model_string.py +++ b/restclients_core/tests/models/test_model_string.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/restclients_core/tests/test_local_cache.py b/restclients_core/tests/test_local_cache.py index b579f44..cc99919 100644 --- a/restclients_core/tests/test_local_cache.py +++ b/restclients_core/tests/test_local_cache.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/restclients_core/tests/test_prometheus.py b/restclients_core/tests/test_prometheus.py index 85beaa4..9ea4841 100644 --- a/restclients_core/tests/test_prometheus.py +++ b/restclients_core/tests/test_prometheus.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from restclients_core.tests.dao_implementation.test_backend import TDAO diff --git a/restclients_core/tests/test_thread.py b/restclients_core/tests/test_thread.py index 670a1ff..be6a9ac 100644 --- a/restclients_core/tests/test_thread.py +++ b/restclients_core/tests/test_thread.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/restclients_core/tests/test_timing_log.py b/restclients_core/tests/test_timing_log.py index b4696b2..c1efb67 100644 --- a/restclients_core/tests/test_timing_log.py +++ b/restclients_core/tests/test_timing_log.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from restclients_core.tests.dao_implementation.test_backend import TDAO diff --git a/restclients_core/tests/util/test_decorators.py b/restclients_core/tests/util/test_decorators.py index e1c3486..affec18 100644 --- a/restclients_core/tests/util/test_decorators.py +++ b/restclients_core/tests/util/test_decorators.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/restclients_core/tests/util/test_mock.py b/restclients_core/tests/util/test_mock.py index f5ad2d4..3c24f9b 100644 --- a/restclients_core/tests/util/test_mock.py +++ b/restclients_core/tests/util/test_mock.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/restclients_core/tests/util/test_retry.py b/restclients_core/tests/util/test_retry.py index a2bd58c..67d59ae 100644 --- a/restclients_core/tests/util/test_retry.py +++ b/restclients_core/tests/util/test_retry.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from unittest import TestCase diff --git a/restclients_core/thread.py b/restclients_core/thread.py index d61d012..bd54730 100644 --- a/restclients_core/thread.py +++ b/restclients_core/thread.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from commonconf import settings diff --git a/restclients_core/util/decorators.py b/restclients_core/util/decorators.py index cbd6cb1..33d7cae 100644 --- a/restclients_core/util/decorators.py +++ b/restclients_core/util/decorators.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from commonconf import override_settings diff --git a/restclients_core/util/local_cache.py b/restclients_core/util/local_cache.py index 77f749d..b7ab0a8 100644 --- a/restclients_core/util/local_cache.py +++ b/restclients_core/util/local_cache.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from threading import currentThread diff --git a/restclients_core/util/mock.py b/restclients_core/util/mock.py index 2d86ae0..5e0c7fb 100644 --- a/restclients_core/util/mock.py +++ b/restclients_core/util/mock.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import re diff --git a/restclients_core/util/performance.py b/restclients_core/util/performance.py index c210362..003612e 100644 --- a/restclients_core/util/performance.py +++ b/restclients_core/util/performance.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from threading import currentThread diff --git a/restclients_core/util/retry.py b/restclients_core/util/retry.py index 3fd72ae..39ddcb6 100644 --- a/restclients_core/util/retry.py +++ b/restclients_core/util/retry.py @@ -1,4 +1,4 @@ -# Copyright 2023 UW-IT, University of Washington +# Copyright 2024 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from restclients_core.exceptions import DataFailureException diff --git a/setup.py b/setup.py index 4747798..921f2d2 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ name='UW-RestClients-Core', version=VERSION, packages=['restclients_core'], - author="UW-IT AXDD", + author="UW-IT T&LS", author_email="aca-it@uw.edu", include_package_data=True, install_requires=['commonconf', @@ -39,7 +39,6 @@ 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.8', ], )