Skip to content

Commit b6d05d7

Browse files
committed
[fern-generated] SDK regeneration
1 parent a217c8e commit b6d05d7

146 files changed

Lines changed: 3730 additions & 1890 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/replay.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.fernignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@ src/agora_agent/agentkit/
99

1010
# Documentation - managed manually, not generated by Fern
1111
docs/
12+
README.md
13+
14+
# Compatibility shim and CI/release workflows are managed manually
15+
compat/
16+
.github/workflows/
17+
.github/workflows/release.yml
1218

1319
# Dependency manifests/lockfiles are managed manually
1420
pyproject.toml
1521
poetry.lock
1622
requirements.txt
23+
.fern/replay.lock
24+
.fern/replay.yml
25+
.gitattributes

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.fern/replay.lock linguist-generated=true

.github/workflows/ci.yml

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,38 @@ jobs:
3535
- name: Test
3636
run: poetry run pytest -rP .
3737

38+
compat-build:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout repo
42+
uses: actions/checkout@v4
43+
- name: Set up python
44+
uses: actions/setup-python@v4
45+
with:
46+
python-version: 3.8
47+
- name: Bootstrap poetry
48+
run: |
49+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
50+
- name: Install primary package
51+
run: poetry install
52+
- name: Build and verify compatibility package
53+
run: |
54+
cd compat/agora-agent-server-sdk
55+
poetry build
56+
cd ../..
57+
poetry run pip install compat/agora-agent-server-sdk/dist/*.whl
58+
poetry run python - <<'PY'
59+
import agora_agent
60+
from agora_agent_server_sdk_compat import Agora, Area, __version__
61+
62+
assert Agora is agora_agent.Agora
63+
assert Area is agora_agent.Area
64+
assert __version__ == agora_agent.__version__
65+
print("Compat shim re-exports verified.")
66+
PY
67+
3868
publish:
39-
needs: [compile, test]
69+
needs: [compile, test, compat-build]
4070
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
4171
runs-on: ubuntu-latest
4272
steps:
@@ -51,9 +81,62 @@ jobs:
5181
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
5282
- name: Install dependencies
5383
run: poetry install
54-
- name: Publish to pypi
84+
85+
- name: Verify package versions match release tag
86+
run: |
87+
TAG_VERSION="${GITHUB_REF_NAME#v}"
88+
ROOT_VERSION="$(poetry version -s | sed 's/^v//')"
89+
COMPAT_VERSION="$(cd compat/agora-agent-server-sdk && poetry version -s | sed 's/^v//')"
90+
COMPAT_DEP_VERSION="$(python -c "import re, sys; from pathlib import Path; text = Path('compat/agora-agent-server-sdk/pyproject.toml').read_text(); match = re.search(r'^agora-agents\s*=\s*\"([^\"]+)\"', text, re.M); sys.exit('agora-agents dependency not found in compat pyproject.toml') if not match else None; print(match.group(1))")"
91+
92+
if [ "$ROOT_VERSION" != "$TAG_VERSION" ]; then
93+
echo "Root package version ($ROOT_VERSION) does not match tag version ($TAG_VERSION)."
94+
exit 1
95+
fi
96+
97+
if [ "$COMPAT_VERSION" != "$TAG_VERSION" ]; then
98+
echo "Compat package version ($COMPAT_VERSION) does not match tag version ($TAG_VERSION)."
99+
exit 1
100+
fi
101+
102+
if [ "$COMPAT_DEP_VERSION" != ">=${TAG_VERSION},<3.0.0" ]; then
103+
echo "Compat package dependency on agora-agents ($COMPAT_DEP_VERSION) does not match >=${TAG_VERSION},<3.0.0."
104+
exit 1
105+
fi
106+
107+
- name: Publish primary package to pypi
55108
run: |
56109
poetry config repositories.remote https://upload.pypi.org/legacy/
57110
poetry --no-interaction -v publish --build --repository remote --username "__token__" --password "$PYPI_API_TOKEN"
58111
env:
59112
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
113+
114+
- name: Wait for primary package on PyPI
115+
run: |
116+
TAG_VERSION="${GITHUB_REF_NAME#v}"
117+
PACKAGE="agora-agents"
118+
for attempt in $(seq 1 12); do
119+
if pip index versions "$PACKAGE" 2>/dev/null | grep -q "$TAG_VERSION"; then
120+
echo "$PACKAGE==$TAG_VERSION is available on PyPI."
121+
exit 0
122+
fi
123+
echo "Waiting for $PACKAGE==$TAG_VERSION on PyPI (attempt $attempt/12)..."
124+
sleep 10
125+
done
126+
echo "Timed out waiting for $PACKAGE==$TAG_VERSION on PyPI."
127+
exit 1
128+
129+
- name: Publish compatibility package to pypi
130+
run: |
131+
cd compat/agora-agent-server-sdk
132+
poetry config repositories.remote https://upload.pypi.org/legacy/
133+
for attempt in $(seq 1 3); do
134+
if poetry --no-interaction -v publish --build --repository remote --username "__token__" --password "$PYPI_API_TOKEN"; then
135+
exit 0
136+
fi
137+
echo "Compat publish failed (attempt $attempt/3). Retrying in 15s..."
138+
sleep 15
139+
done
140+
exit 1
141+
env:
142+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)