Skip to content

Commit 4430752

Browse files
committed
ci: Remove noxfile and add shell script
1 parent a3e6071 commit 4430752

File tree

8 files changed

+54
-173
lines changed

8 files changed

+54
-173
lines changed

.coveragerc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ omit =
44
*/tests/*
55
*/site-packages/*
66
*/__init__.py
7-
*/noxfile.py*
87
src/a2a/grpc/*
98

109
[report]

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Before submitting your PR, there are a few things you can do to make sure it goe
99
- `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch.
1010
- `feat:` represents a new feature, and correlates to a SemVer minor.
1111
- `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major.
12-
- [ ] Ensure the tests and linter pass (Run `nox -s format` from the repository root to format)
12+
- [ ] Ensure the tests and linter pass (Run `bash scripts/format.sh` from the repository root to format)
1313
- [ ] Appropriate docs were updated (if necessary)
1414

1515
Fixes #<issue_number_goes_here> 🦕

.github/actions/spelling/allow.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,21 @@
11
ACard
22
AClient
3+
aconnect
4+
adk
35
AError
46
AFast
7+
agentic
58
AGrpc
9+
aio
10+
aiomysql
11+
aproject
612
ARequest
713
ARun
814
AServer
915
AServers
1016
AService
1117
AStarlette
1218
AUser
13-
DSNs
14-
EUR
15-
GBP
16-
GVsb
17-
INR
18-
JPY
19-
JSONRPCt
20-
Llm
21-
POSTGRES
22-
RUF
23-
aconnect
24-
adk
25-
agentic
26-
aio
27-
aiomysql
28-
aproject
2919
autouse
3020
backticks
3121
cla
@@ -35,22 +25,30 @@ codegen
3525
coro
3626
datamodel
3727
drivername
28+
DSNs
3829
dunders
3930
euo
31+
EUR
4032
excinfo
4133
fernet
4234
fetchrow
4335
fetchval
36+
GBP
4437
genai
4538
getkwargs
4639
gle
40+
GVsb
4741
initdb
4842
inmemory
43+
INR
4944
isready
45+
JPY
46+
JSONRPCt
5047
kwarg
5148
langgraph
5249
lifecycles
5350
linting
51+
Llm
5452
lstrips
5553
mockurl
5654
notif
@@ -59,13 +57,15 @@ oidc
5957
opensource
6058
otherurl
6159
postgres
60+
POSTGRES
6261
postgresql
6362
protoc
6463
pyi
6564
pypistats
6665
pyversions
6766
respx
6867
resub
68+
RUF
6969
socio
7070
sse
7171
tagwords

.github/actions/spelling/excludes.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
^\.github/actions/spelling/
8787
^\.github/workflows/
8888
CHANGELOG.md
89-
noxfile.py
9089
^src/a2a/grpc/
9190
^tests/
9291
.pre-commit-config.yaml

.ruff.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ exclude = [
8181
"node_modules",
8282
"venv",
8383
"*/migrations/*",
84-
"noxfile.py",
8584
"src/a2a/grpc/**",
8685
"tests/**",
8786
]

noxfile.py

Lines changed: 0 additions & 153 deletions
This file was deleted.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ dev = [
8888
"types-protobuf",
8989
"types-requests",
9090
"pre-commit",
91+
"pyupgrade",
92+
"autoflake",
93+
"no_implicit_optional",
9194
]
9295

9396
[[tool.uv.index]]

scripts/format.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Sort Spelling Allowlist
5+
# The user did not provide this file, so we check for its existence.
6+
SPELLING_ALLOW_FILE=".github/actions/spelling/allow.txt"
7+
if [ -f "$SPELLING_ALLOW_FILE" ]; then
8+
sort -u "$SPELLING_ALLOW_FILE" -o "$SPELLING_ALLOW_FILE"
9+
fi
10+
11+
TARGET_BRANCH="origin/${GITHUB_BASE_REF:-main}"
12+
git fetch origin "${GITHUB_BASE_REF:-main}" --depth=1
13+
14+
# Find merge base between HEAD and target branch
15+
MERGE_BASE=$(git merge-base HEAD "$TARGET_BRANCH")
16+
17+
# Get python files changed in this PR, excluding grpc generated files
18+
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "$MERGE_BASE" HEAD | grep '\.py$' | grep -v 'src/a2a/grpc/' || true)
19+
20+
if [ -z "$CHANGED_FILES" ]; then
21+
echo "No changed Python files to format."
22+
exit 0
23+
fi
24+
25+
echo "Formatting changed files:"
26+
echo "$CHANGED_FILES"
27+
28+
# Formatters are already installed in the activated venv from the GHA step.
29+
# Use xargs to pass the file list to the formatters.
30+
echo "$CHANGED_FILES" | xargs -r no_implicit_optional --use-union-or
31+
echo "$CHANGED_FILES" | xargs -r pyupgrade --exit-zero-even-if-changed --py310-plus
32+
echo "$CHANGED_FILES" | xargs -r autoflake -i -r --remove-all-unused-imports
33+
echo "$CHANGED_FILES" | xargs -r ruff check --fix-only
34+
echo "$CHANGED_FILES" | xargs -r ruff format

0 commit comments

Comments
 (0)