Conversation
- Update Cargo.toml to use aptos-sdk from GitHub (not yet on crates.io) - Replace all aptos_rust_sdk_v2 imports with aptos_sdk - Add sha3 dependency for hashing support - Update README, SDK_STATUS.md, Makefile, and project docs - Update CLAUDE.md, AGENTS.md, FEATURE_COVERAGE.md references - Remove stale Cargo.lock for regeneration Co-authored-by: Greg Nazario <greg@gnazar.io>
- FaucetClient::new now takes &AptosConfig instead of AptosConfig - TypeTag enum now includes signed integer variants (I8-I256) Co-authored-by: Greg Nazario <greg@gnazar.io>
Co-authored-by: Greg Nazario <greg@gnazar.io>
|
Cursor Agent can help with this pull request. Just |
Prettier (docs/features): - Format FEATURE_COVERAGE.md, tests/rust/README.md, tests/rust/SDK_STATUS.md Rust (cargo fmt + clippy): - Run cargo fmt on all Rust source files - Remove unused imports (Account, Signer, Verifier, etc.) across step definitions - Remove unused trait imports that shadowed inherent methods - Apply clippy auto-fixes where possible Python (black + flake8): - Run black formatter on all 53 Python step/support files (28 reformatted) - Remove unused imports with autoflake (F401) - Fix f-string without placeholders (F541) - Fix redefined function name step_tx_hashes_different (F811) Go: - Run go fmt on all Go source files - Passes go vet cleanly Co-authored-by: Greg Nazario <greg@gnazar.io>
There was a problem hiding this comment.
Pull request overview
This PR migrates Rust behavioral specification tests from the deprecated local path dependency aptos-rust-sdk-v2 to the official aptos-sdk from the GitHub repository. The migration includes updating all import statements, adapting to minor API changes in the new SDK, and improving code formatting.
Changes:
- Replaced local path dependency with Git dependency from
https://github.com/aptos-labs/aptos-rust-sdk - Global rename of
aptos_rust_sdk_v2toaptos_sdkacross all Rust source files - Updated
FaucetClient::newto accept a reference parameter instead of owned value - Added missing TypeTag enum variants (I8, I16, I32, I64, I128, I256) for integer type support
- Applied rustfmt formatting improvements throughout Rust test files
- Cleaned up unused imports in Python test files
- Updated documentation (README, SDK_STATUS, FEATURE_COVERAGE) to reflect the new dependency
Reviewed changes
Copilot reviewed 82 out of 83 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/rust/Cargo.toml | Changed from local path to Git dependency with full features |
| tests/rust/src/**/*.rs | Renamed imports from aptos_rust_sdk_v2 to aptos_sdk |
| tests/rust/src/steps/client_steps.rs | Updated FaucetClient::new to use reference parameter |
| tests/rust/src/steps/type_tags_steps.rs | Added I8-I256 TypeTag variant handling |
| tests/rust/SDK_STATUS.md | Updated package name, version, and feature documentation |
| tests/python/steps/**/*.py | Removed unused imports (cleanup) |
| Various .md files | Updated references to new SDK name |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/python/steps/general_steps.py
Outdated
| pass | ||
|
|
There was a problem hiding this comment.
Unnecessary 'pass' statement.
| pass |
tests/python/steps/general_steps.py
Outdated
| pass | ||
|
|
There was a problem hiding this comment.
Unnecessary 'pass' statement.
| pass |
tests/python/steps/general_steps.py
Outdated
| @given("a devnet client") | ||
| def step_devnet_client(context): | ||
| from aptos_sdk.async_client import RestClient | ||
| pass |
There was a problem hiding this comment.
Unnecessary 'pass' statement.
| pass | ||
|
|
||
| context.world.test_vectors["fee_payer_address"] = "A" | ||
|
|
||
|
|
There was a problem hiding this comment.
Unnecessary 'pass' statement.
| pass | |
| context.world.test_vectors["fee_payer_address"] = "A" | |
| context.world.test_vectors["fee_payer_address"] = "A" |
| pass | ||
|
|
There was a problem hiding this comment.
Unnecessary 'pass' statement.
| pass |
Address PR review comments: remove pass statements that were left behind by autoflake when it stripped unused imports from try blocks and function bodies that had real code following the pass. Co-authored-by: Greg Nazario <greg@gnazar.io>
Migrate Rust behavioral specs to use the new
aptos-rust-sdkfrom GitHub.This change replaces the deprecated local path dependency (
aptos-rust-sdk-v2) with the officialaptos-labs/aptos-rust-sdkrepository, ensuring tests run against the latest SDK. This involved updatingCargo.tomlto a git dependency, performing a global find-and-replace ofaptos_rust_sdk_v2withaptos_sdkacross all Rust source files, and making minor API compatibility adjustments (e.g.,FaucetClient::newsignature,TypeTagenum variants). All relevant documentation and project references have also been updated.