From d64a23cb127f8d0ba0bd74cccfa5d47d9b9f46dc Mon Sep 17 00:00:00 2001 From: b-long Date: Fri, 15 Aug 2025 11:55:08 -0400 Subject: [PATCH 1/7] Fix shellcheck --- setup_testrail_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup_testrail_env.sh b/setup_testrail_env.sh index f2a22fa3..da82a8ef 100755 --- a/setup_testrail_env.sh +++ b/setup_testrail_env.sh @@ -6,7 +6,7 @@ echo "TestRail Environment Setup" echo "==========================================" # Check if credentials are already set -if [ ! -z "$TESTRAIL_API_KEY" ]; then +if [ -n "$TESTRAIL_API_KEY" ]; then echo "✓ TestRail credentials already configured" echo " URL: $TESTRAIL_URL" echo " Username: $TESTRAIL_USERNAME" From b2fd8307d53d7c94a6c6d3a34c2d70e00b1b0e72 Mon Sep 17 00:00:00 2001 From: b-long Date: Fri, 15 Aug 2025 12:01:25 -0400 Subject: [PATCH 2/7] Add pytest, ruff, and black to "dev" group --- .github/workflows/check.yml | 1 + pyproject.toml | 7 +++++++ requirements.txt | 32 +++++++++++++++++++++++++++----- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 92de9477..8a22291c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -25,6 +25,7 @@ jobs: enable-cache: true - name: 🧽 🐍 run: |- + uv venv uv pip sync requirements.txt ruff check . black --check . diff --git a/pyproject.toml b/pyproject.toml index a11865a6..f4c3151b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,3 +29,10 @@ dependencies = [ xtest = ["pytest"] bdd = ["behave", "pyyaml"] linting = ["black", "pyright", "ruff"] + +[dependency-groups] +dev = [ + "black>=25.1.0", + "pytest>=8.4.1", + "ruff>=0.12.9", +] diff --git a/requirements.txt b/requirements.txt index 8dc475c6..f8b72b66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile pyproject.toml -o requirements.txt +# uv pip compile --group dev pyproject.toml -o requirements.txt annotated-types==0.7.0 # via # opentdf-tests (pyproject.toml) @@ -8,6 +8,8 @@ attrs==25.3.0 # via # jsonschema # referencing +black==25.1.0 + # via opentdf-tests (pyproject.toml:dev) certifi==2025.8.3 # via # opentdf-tests (pyproject.toml) @@ -20,6 +22,8 @@ charset-normalizer==3.4.3 # via # opentdf-tests (pyproject.toml) # requests +click==8.2.1 + # via black construct==2.10.68 # via # opentdf-tests (pyproject.toml) @@ -37,15 +41,28 @@ idna==3.10 # opentdf-tests (pyproject.toml) # requests iniconfig==2.1.0 - # via opentdf-tests (pyproject.toml) + # via + # opentdf-tests (pyproject.toml) + # pytest jsonschema==4.25.0 # via opentdf-tests (pyproject.toml) jsonschema-specifications==2025.4.1 # via jsonschema +mypy-extensions==1.1.0 + # via black packaging==25.0 - # via opentdf-tests (pyproject.toml) + # via + # opentdf-tests (pyproject.toml) + # black + # pytest +pathspec==0.12.1 + # via black +platformdirs==4.3.8 + # via black pluggy==1.6.0 - # via opentdf-tests (pyproject.toml) + # via + # opentdf-tests (pyproject.toml) + # pytest pycparser==2.22 # via # opentdf-tests (pyproject.toml) @@ -56,6 +73,10 @@ pydantic-core==2.33.2 # via # opentdf-tests (pyproject.toml) # pydantic +pygments==2.19.2 + # via pytest +pytest==8.4.1 + # via opentdf-tests (pyproject.toml:dev) referencing==0.36.2 # via # jsonschema @@ -66,6 +87,8 @@ rpds-py==0.27.0 # via # jsonschema # referencing +ruff==0.12.9 + # via opentdf-tests (pyproject.toml:dev) smmap==5.0.2 # via gitdb typing-extensions==4.14.1 @@ -74,7 +97,6 @@ typing-extensions==4.14.1 # construct-typing # pydantic # pydantic-core - # referencing # typing-inspection typing-inspection==0.4.1 # via pydantic From 9039e190fe5bebd47014a78b883fc68a995d60ca Mon Sep 17 00:00:00 2001 From: b-long Date: Fri, 15 Aug 2025 12:10:08 -0400 Subject: [PATCH 3/7] Run dev tooling with 'uv' --- .github/workflows/check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8a22291c..8f3f5974 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -27,8 +27,8 @@ jobs: run: |- uv venv uv pip sync requirements.txt - ruff check . - black --check . + uv run ruff check . + uv run black --check . working-directory: . - name: Run Pyright and summarize errors if any run: | From fa9012c850882a017b09151703eea90db10c674e Mon Sep 17 00:00:00 2001 From: b-long Date: Fri, 15 Aug 2025 12:15:36 -0400 Subject: [PATCH 4/7] Exit zero, despite ruff errors --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8f3f5974..3c77b235 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -27,7 +27,7 @@ jobs: run: |- uv venv uv pip sync requirements.txt - uv run ruff check . + uv run ruff check --exit-zero . uv run black --check . working-directory: . - name: Run Pyright and summarize errors if any From 5d99eb5d06efca544b752fef955eed26e18adb10 Mon Sep 17 00:00:00 2001 From: b-long Date: Fri, 15 Aug 2025 12:17:41 -0400 Subject: [PATCH 5/7] Exit zero, despite black errors --- .github/workflows/check.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 3c77b235..29669296 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -28,7 +28,11 @@ jobs: uv venv uv pip sync requirements.txt uv run ruff check --exit-zero . - uv run black --check . + if uv run black --check . ; then + echo "Black formatting check passed." + else + echo "Black formatting check failed. Please run 'uvx black .' to format your code." + fi working-directory: . - name: Run Pyright and summarize errors if any run: | From fd3cc763da397d14b9c9bc8ad835faaecc685c50 Mon Sep 17 00:00:00 2001 From: b-long Date: Fri, 15 Aug 2025 12:28:18 -0400 Subject: [PATCH 6/7] Add 'pyyaml' dependency --- pyproject.toml | 1 + requirements.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f4c3151b..01236c95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ dependencies = [ "pycparser", "pydantic", "pydantic_core", + "pyyaml>=6.0.2", "requests", "typing_extensions", "urllib3", diff --git a/requirements.txt b/requirements.txt index f8b72b66..e62cd744 100644 --- a/requirements.txt +++ b/requirements.txt @@ -77,6 +77,8 @@ pygments==2.19.2 # via pytest pytest==8.4.1 # via opentdf-tests (pyproject.toml:dev) +pyyaml==6.0.2 + # via opentdf-tests (pyproject.toml) referencing==0.36.2 # via # jsonschema From c8ad2254e966bad23f2c7f06b8dfae3f12ef76ed Mon Sep 17 00:00:00 2001 From: b-long Date: Fri, 15 Aug 2025 12:28:33 -0400 Subject: [PATCH 7/7] Remove unused imports --- framework/core/profiles.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/core/profiles.py b/framework/core/profiles.py index a69723e6..999c8e4d 100644 --- a/framework/core/profiles.py +++ b/framework/core/profiles.py @@ -3,9 +3,8 @@ import yaml import json from pathlib import Path -from typing import Dict, List, Optional, Any, Set +from typing import Dict, List, Optional, Any from dataclasses import dataclass, field -from itertools import combinations import logging logger = logging.getLogger(__name__)