From 9d2b51c2ef66c76f0da09e4a35b1bef5bf5af247 Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 11:13:20 -0700 Subject: [PATCH 01/12] (Mass) Update azure-pipelines.yml --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 43b305c..8c027e2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,9 +19,9 @@ schedules: resources: repositories: - - repository: OpsGuildAutomationRepo + - repository: ArchitectureRepo type: git - name: DevOps/opsguild.automation + name: Architecture/Architecture ref: refs/heads/main - repository: templates type: github @@ -34,7 +34,7 @@ variables: parameters: - name: pool - default: DevOps Managed Containers Build + default: DevOps-Managed-Ubt22-Mdp - name: containerDemands type: object default: ['Agent.OS -equals Linux'] @@ -80,4 +80,4 @@ jobs: failTaskOnFailedTests: true testRunTitle: '$(Agent.JobName) on $(Agent.OS)' displayName: 'Publish test results' - condition: always() \ No newline at end of file + condition: always() From 1e3303c1669d0fce25e88c7fdb0ad4d91c9e3516 Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 14:46:03 -0700 Subject: [PATCH 02/12] Use fixpip ADO ArchitectureRepo template for BlackDuck diagnostics --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8c027e2..3503f47 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,7 +22,7 @@ resources: - repository: ArchitectureRepo type: git name: Architecture/Architecture - ref: refs/heads/main + ref: refs/heads/fixpip - repository: templates type: github name: AVEVA/AVEVA-Samples From 7b9ae374ed17bbdb916f47dcfad71d2f510566f6 Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 15:08:57 -0700 Subject: [PATCH 03/12] Remove call from python steps --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3503f47..45867e7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,10 +45,10 @@ jobs: buildSteps: - script: | echo Install tools - call pip install wheel - call pip install twine + pip install wheel + pip install twine echo Build library - call python setup.py sdist bdist_wheel + python setup.py sdist bdist_wheel echo Complete displayName: 'Build' From b3e34490bd3d016a40ae92b387d887c0e43af863 Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 15:40:35 -0700 Subject: [PATCH 04/12] Add more debug info to build steps --- azure-pipelines.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 45867e7..9113bab 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,6 +45,13 @@ jobs: buildSteps: - script: | echo Install tools + echo DEBUG print tool locations + which python + which python3 + echo DEBUG print pip locations + python -m pip --version + python3 -m pip --version + echo Begin installing with pip pip install wheel pip install twine echo Build library From e829987a64186df4d77e522fa540da768461f0b8 Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 16:00:08 -0700 Subject: [PATCH 05/12] Install built library to support BlackDuck PIP detection --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9113bab..d317f36 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -56,6 +56,8 @@ jobs: pip install twine echo Build library python setup.py sdist bdist_wheel + echp Install library + pip install . echo Complete displayName: 'Build' From 49dbed9239a705040a14d35793f9b950fbed9584 Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 16:08:47 -0700 Subject: [PATCH 06/12] Remove . from requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 945c9b4..e69de29 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +0,0 @@ -. \ No newline at end of file From c709dc156ad9ff6a19b519ed4d7467193d788840 Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 16:52:45 -0700 Subject: [PATCH 07/12] Move test requirements to extras because tests_require is deprecated in SetupTools --- azure-pipelines.yml | 6 +++--- setup.py | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d317f36..0c7c061 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -72,10 +72,10 @@ jobs: secrets: 'TenantId, NamespaceId, ClientId, ClientSecret, Resource' - script: | - echo Install test tools - pip install pytest echo Install requirements - pip install -r requirements.txt + pip install ".[test]" + echo Listing pip packages after installing test suite + pip list echo Run tests cd ./adh_sample_library_preview/Tests python -m pytest --junitxml=junit/test-results-baseclient.xml test_baseclient.py --e2e True diff --git a/setup.py b/setup.py index 75c6680..bf1b6b6 100644 --- a/setup.py +++ b/setup.py @@ -19,9 +19,11 @@ 'python-dateutil>=2.8.2', 'jsonpatch>=1.32' ], - tests_require = [ - 'pytest>=7.0.1', - ], + extras_require={ + 'test': [ + 'pytest>=7.0.1', + ] + }, python_requires='>=3.7', classifiers=[ 'Programming Language :: Python :: 3', From aff511c3148813ee738ba13f44da7fd768ec4cac Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 17:03:45 -0700 Subject: [PATCH 08/12] Cleanup pipeline debug steps --- azure-pipelines.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0c7c061..1779255 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,18 +45,11 @@ jobs: buildSteps: - script: | echo Install tools - echo DEBUG print tool locations - which python - which python3 - echo DEBUG print pip locations - python -m pip --version - python3 -m pip --version - echo Begin installing with pip pip install wheel pip install twine echo Build library python setup.py sdist bdist_wheel - echp Install library + echo Install library pip install . echo Complete displayName: 'Build' @@ -72,10 +65,8 @@ jobs: secrets: 'TenantId, NamespaceId, ClientId, ClientSecret, Resource' - script: | - echo Install requirements + echo Install requirements for tests pip install ".[test]" - echo Listing pip packages after installing test suite - pip list echo Run tests cd ./adh_sample_library_preview/Tests python -m pytest --junitxml=junit/test-results-baseclient.xml test_baseclient.py --e2e True From 81bca0ec4f26aeaca4627ad59f220fe6b0783989 Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Tue, 6 May 2025 16:34:33 -0700 Subject: [PATCH 09/12] Fix tests validateRequiredParameters --- adh_sample_library_preview/Tests/test_baseclient.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adh_sample_library_preview/Tests/test_baseclient.py b/adh_sample_library_preview/Tests/test_baseclient.py index 636f4e8..d8e1c5b 100644 --- a/adh_sample_library_preview/Tests/test_baseclient.py +++ b/adh_sample_library_preview/Tests/test_baseclient.py @@ -34,11 +34,11 @@ def test_check_response_error_response(baseClient): def test_validate_parameters_raises_error(baseClient): with pytest.raises(TypeError): - baseClient.validateParameters('good', 'gooder', None) + baseClient.validateRequiredParameters('good', 'gooder', None) with pytest.raises(TypeError): - baseClient.validateParameters('good', 'gooder', []) + baseClient.validateRequiredParameters('good', 'gooder', []) def test_validate_parameters_valid(baseClient): - baseClient.validateParameters('good', 'gooder', 'goodest') \ No newline at end of file + baseClient.validateRequiredParameters('good', 'gooder', 'goodest') \ No newline at end of file From e40403c6124c347e5ea9961ec7e9c70cddfc33e7 Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 17:09:23 -0700 Subject: [PATCH 10/12] Remove using fixpip branch of architecture repo for BlackDuck debug --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1779255..5b66de4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,7 +22,7 @@ resources: - repository: ArchitectureRepo type: git name: Architecture/Architecture - ref: refs/heads/fixpip + ref: refs/heads/main - repository: templates type: github name: AVEVA/AVEVA-Samples From 792682dd2e6c8ff9a380bc6f01014dba06669dbc Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 17:15:03 -0700 Subject: [PATCH 11/12] Remove empty requirements.txt --- requirements.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e69de29..0000000 From 1f6f0d593b857c9a1973d6f9f37378eb3055cbf9 Mon Sep 17 00:00:00 2001 From: Evan Greavu Date: Mon, 19 May 2025 17:23:29 -0700 Subject: [PATCH 12/12] Update readme and increment version --- HISTORY.md | 5 +++++ README.md | 2 +- setup.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 9ad2fbc..15a7229 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Version History +## 0.10.18_preview / 2025-05-19 + +- Fixed failing tests +- Updated requirements for tests + ## 0.10.17_preview / 2025-04-15 - Fixed issue in Update toDictionary function diff --git a/README.md b/README.md index 30ed379..7097daf 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ | :loudspeaker: **Notice**: This library is an AVEVA Data Hub targeted version of the ocs_sample_library_preview. The ocs_sample_library_preview library is being deprecated and this library should be used moving forward. | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -**Version:** 0.10.17_preview +**Version:** 0.10.18_preview [![Build Status](https://dev.azure.com/osieng/engineering/_apis/build/status/product-readiness/ADH/aveva.sample-adh-sample_libraries-python?branchName=main)](https://dev.azure.com/osieng/engineering/_build/latest?definitionId=4674&branchName=main) diff --git a/setup.py b/setup.py index bf1b6b6..99b3795 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='adh_sample_library_preview', - version='0.10.17_preview', + version='0.10.18_preview', author='OSIsoft', license='Apache 2.0', author_email='samples@osisoft.com',