Skip to content

Commit fe9c464

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

156 files changed

Lines changed: 5634 additions & 2253 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,21 @@ src/agora_agent/agentkit/
99

1010
# Documentation - managed manually, not generated by Fern
1111
docs/
12+
README.md
13+
reference.md
14+
15+
# Tests - managed manually, not generated by Fern
16+
tests/
17+
18+
# Compatibility shim and CI/release workflows are managed manually
19+
compat/
20+
.github/workflows/
21+
.github/workflows/release.yml
1222

1323
# Dependency manifests/lockfiles are managed manually
1424
pyproject.toml
1525
poetry.lock
1626
requirements.txt
27+
.fern/replay.lock
28+
.fern/replay.yml
29+
.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: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
1616
- name: Install dependencies
1717
run: poetry install
18+
- name: Release metadata check
19+
run: poetry run python scripts/check_release_workflow.py
1820
- name: Compile
1921
run: poetry run mypy .
2022
test:
@@ -35,8 +37,38 @@ jobs:
3537
- name: Test
3638
run: poetry run pytest -rP .
3739

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

0 commit comments

Comments
 (0)