diff --git a/.github/scripts/codegen-check.sh b/.github/scripts/codegen-check.sh index 3f27ae3..6bf43e0 100644 --- a/.github/scripts/codegen-check.sh +++ b/.github/scripts/codegen-check.sh @@ -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)" @@ -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 @@ -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')