diff --git a/.github/workflows/stacks.yml b/.github/workflows/stacks.yml index f4e3022..cebd31f 100644 --- a/.github/workflows/stacks.yml +++ b/.github/workflows/stacks.yml @@ -66,9 +66,15 @@ jobs: - name: Test endpoints run: | while IFS= read -r dir; do + service_name=$(basename "$dir") echo "Testing endpoints for $dir" - service_name=$(basename "$dir") + # Skip config packages + if [[ "$service_name" == *"config"* ]]; then + echo "Skipping config package: $service_name" + continue + fi + port=$(bun run @eda/config getPorts $service_name) if [ -z "$port" ]; then diff --git a/apps/ai_api/.flake8 b/apps/ai_api/.flake8 index 5e366e4..65a2615 100644 --- a/apps/ai_api/.flake8 +++ b/apps/ai_api/.flake8 @@ -87,6 +87,7 @@ hang-closing = True # E133 - closing bracket is missing indentation (conflicts with black) # E203 - whitespace before ‘:’ (conflicts with black) # W503 - line break before binary operator +# W504 - line break after binary operator # F401 - module imported but unused # F403 - ‘from module import *’ used; unable to detect undefined names # @@ -95,7 +96,8 @@ hang-closing = True ignore = E133, E203, - W503 + W503, + W504 # Specify the list of error codes you wish Flake8 to report. select = E, diff --git a/apps/ai_api/eda_ai_api/main.py b/apps/ai_api/eda_ai_api/main.py index 3ba7007..92fb3cc 100644 --- a/apps/ai_api/eda_ai_api/main.py +++ b/apps/ai_api/eda_ai_api/main.py @@ -31,15 +31,14 @@ def run_server() -> None: # Use localhost for development, configure via config for production host = "127.0.0.1" # Default to localhost - if ( + allow_external = ( hasattr(config.services.ai_api, "allow_external") and config.services.ai_api.allow_external - ): + ) + if allow_external: host = "0.0.0.0" # nosec B104 # Explicitly allowed in config - uvicorn.run( - "eda_ai_api.main:app", host=host, port=config.ports.ai_api, reload=True - ) + uvicorn.run("eda_ai_api.main:app", host=host, port=config.ports.ai_api, reload=True) if __name__ == "__main__": diff --git a/apps/ai_api/package.json b/apps/ai_api/package.json index c46f123..977da37 100644 --- a/apps/ai_api/package.json +++ b/apps/ai_api/package.json @@ -4,7 +4,7 @@ "scripts": { "dev": "uv run python -m eda_ai_api.main", "start": "uv run python -m eda_ai_api.main", - "lint": "bash ./scripts/linting.sh", + "lint": "uvx flake8 eda_ai_api --config=setup.cfg", "test": "bash ./scripts/test.sh" } } diff --git a/apps/ai_api/setup.cfg b/apps/ai_api/setup.cfg index 1616126..46802d3 100644 --- a/apps/ai_api/setup.cfg +++ b/apps/ai_api/setup.cfg @@ -7,3 +7,9 @@ branch = True [coverage:report] precision = 2 + +[flake8] +ignore = E133,E203,W503,W504 +max-line-length = 100 +extend-ignore = W503 +per-file-ignores = __init__.py:F401 diff --git a/apps/messaging/package.json b/apps/messaging/package.json index 59da657..611acbc 100644 --- a/apps/messaging/package.json +++ b/apps/messaging/package.json @@ -8,7 +8,7 @@ "start": "bun run dist/index.js", "test": "bun test", "clean": "rm -rf .turbo node_modules dist", - "lint": "biome lint", + "lint": "biome lint ./src", "format": "biome format --write .", "typecheck": "tsc-files --noEmit" }, diff --git a/biome.json b/biome.json index f849c6c..0c6f157 100644 --- a/biome.json +++ b/biome.json @@ -4,22 +4,26 @@ "enabled": true }, "files": { - "ignore": ["src/components/ui"] + "ignore": [ + "src/components/ui", + "**/dist/**", + "dist", + "**/dist", + "apps/messaging/dist" + ], + "maxSize": 3145728 }, "linter": { - "ignore": ["node_modules", ".next", "packages/tsconfig"], + "ignore": [ + "node_modules", + ".next", + "packages/tsconfig", + "**/dist/**", + "dist" + ], "enabled": true, "rules": { - "recommended": true, - "a11y": { - "noSvgWithoutTitle": "off" - }, - "style": { - "noNonNullAssertion": "off" - }, - "correctness": { - "useExhaustiveDependencies": "off" - } + "recommended": true } }, "formatter": {