Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/scripts/codegen-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# requirements.txt pins installed — no editable install of the SDK source tree.
#
# Requires `tx3c` and `python` on PATH.
# Last verified against fleet v0.12.0 (unified Tx3ClientBuilder).
set -euo pipefail

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
Expand All @@ -25,10 +26,14 @@ done

for sym in \
'TARGET_TII_VERSION' \
'PROFILES' \
'TRANSFER_TIR' \
'class TransferParams' \
'class Client'; do
'class Client' \
'class Profile(str, Enum)' \
'_LOCAL_PROFILE' \
'_PREPROD_PROFILE' \
'Tx3ClientBuilder.from_parts' \
'with_party_unchecked'; do
grep -qF "$sym" "$gen/__init__.py" || { echo "generated __init__.py missing: $sym"; exit 1; }
done

Expand All @@ -44,7 +49,7 @@ module = importlib.util.module_from_spec(spec)
sys.modules[spec.name] = module
spec.loader.exec_module(module)
assert module.TARGET_TII_VERSION == 'v1beta0', module.TARGET_TII_VERSION
assert set(module.PROFILES) == {'local', 'preprod'}, module.PROFILES
assert {p.value for p in module.Profile} == {'local', 'preprod'}, list(module.Profile)
assert module.TRANSFER_TIR.version == 'v1beta0'
assert module.TransferParams(quantity=1).quantity == 1
print('generated module imported OK')
Expand Down
Loading