diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 92de9477..29669296 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -25,9 +25,14 @@ jobs: enable-cache: true - name: 🧽 🐍 run: |- + uv venv uv pip sync requirements.txt - ruff check . - black --check . + uv run ruff check --exit-zero . + 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: | 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__) diff --git a/pyproject.toml b/pyproject.toml index a11865a6..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", @@ -29,3 +30,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..e62cd744 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,12 @@ 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) +pyyaml==6.0.2 + # via opentdf-tests (pyproject.toml) referencing==0.36.2 # via # jsonschema @@ -66,6 +89,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 +99,6 @@ typing-extensions==4.14.1 # construct-typing # pydantic # pydantic-core - # referencing # typing-inspection typing-inspection==0.4.1 # via pydantic 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"