Skip to content

Commit 7badec0

Browse files
committed
resolve styling and format checks on qa-report branch
1 parent 4ff982c commit 7badec0

4 files changed

Lines changed: 108 additions & 6 deletions

File tree

.github/workflows/periodic-qa.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ name: A2UI Periodic QA-Demo Status Audit
1616

1717
on:
1818
push:
19-
branches: [ "main" ]
19+
branches: ["main"]
2020
paths:
21-
- 'specification/**/json/**'
22-
- 'scripts/qa_report.py'
21+
- "specification/**/json/**"
22+
- "scripts/qa_report.py"
2323
pull_request:
2424
paths:
25-
- 'specification/**/json/**'
26-
- 'scripts/qa_report.py'
25+
- "specification/**/json/**"
26+
- "scripts/qa_report.py"
2727

2828
jobs:
2929
static-ui-validation:
@@ -39,7 +39,7 @@ jobs:
3939
- name: Setup Python Architecture
4040
uses: actions/setup-python@v5
4141
with:
42-
python-version: '3.11'
42+
python-version: "3.11"
4343

4444
- name: Execute Offline Validation Script
4545
working-directory: ./agent_sdks/python

.prettierignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
node_modules
16+
dist
17+
build
18+
.git
19+
.dart_tool
20+
.venv
21+
*.min.js
22+
agent_sdks/conformance/test_data/**
23+
**/pnpm-lock.yaml

.prettierrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"semi": true,
5+
"tabWidth": 2,
6+
"trailingComma": "all",
7+
"bracketSpacing": false,
8+
"jsxSingleQuote": false,
9+
"arrowParens": "avoid",
10+
"overrides": [
11+
{
12+
"files": "*.html",
13+
"options": {
14+
"parser": "angular"
15+
}
16+
},
17+
{
18+
"files": ["*.yaml", "*.yml"],
19+
"options": {
20+
"singleQuote": false
21+
}
22+
}
23+
]
24+
}

scripts/fix_format.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
# Copyright 2026 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -euo pipefail
17+
18+
CHECK_ONLY=false
19+
if [[ "${1:-}" == "--check" ]]; then
20+
CHECK_ONLY=true
21+
fi
22+
23+
# Get repo root
24+
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
25+
cd "$REPO_ROOT"
26+
27+
echo "Running Prettier..."
28+
if [ "$CHECK_ONLY" = true ]; then
29+
npx -y prettier --config .prettierrc --check .
30+
else
31+
npx -y prettier --config .prettierrc --write .
32+
fi
33+
34+
echo "Running Pyink for Python..."
35+
cd "$REPO_ROOT/agent_sdks/python"
36+
if [ "$CHECK_ONLY" = true ]; then
37+
uv run pyink --check src tests
38+
else
39+
uv run pyink src tests
40+
fi
41+
42+
echo "Running Dart format..."
43+
cd "$REPO_ROOT"
44+
# Check if dart is available before running
45+
if command -v dart >/dev/null 2>&1; then
46+
if [ "$CHECK_ONLY" = true ]; then
47+
dart format --output=none --set-exit-if-changed .
48+
else
49+
dart format .
50+
fi
51+
else
52+
echo "Warning: dart command not found. Skipping Dart formatting."
53+
fi
54+
55+
echo "Done."

0 commit comments

Comments
 (0)