-
Notifications
You must be signed in to change notification settings - Fork 93
feat: Add set node account id method #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Add set node account id method #362
Conversation
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
…xamples Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
Signed-off-by: dosi <dosi.kolev@limechain.tech>
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @accepaluni please remember to pre-fix your PR title eg
feat: add set node account id method
additionally, we now have a changelog, which must be updated with each PR
|
Hi @aceppaluni, |
|
Hi @nadineloepfe Yes, my apologies. |
|
@exploreriii I think I have fixed it |
src/hiero_sdk_python/query/query.py
Outdated
| self.node_index: int = 0 | ||
| self.payment_amount: Optional[Hbar] = None | ||
|
|
||
| self.node_account_ids: Optional[List[AccountId]] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just seen - this is duplicated
there;s another self.node_account_ids on line 57. Please remove!
I've also created a branch here to see if it all works with some minor changes, see here:
https://github.com/hiero-ledger/hiero-sdk-python/pull/853/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
mostly wanted to fix the weird error in the pipeline, hard to see what's going on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to clean this up and address the CI issues. I’ve reviewed the changes in your branch and they all make sense. Everything looks good from my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @aceppaluni
The tests here are still failing, what's the next steps? @nadineloepfe will you be working on the new branch any further, or will @aceppaluni use that for reference to update this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @exploreriii, I’m currently awaiting @nadineloepfe 's guidance on how she’d like to proceed. My understanding is that the branch she created will address the test issue and allow us to finalize this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@exploreriii @aceppaluni: correct! the branch I've raised is passing, so if you'd like you can take inspiration there, and we can also jump on a call to walk through what has been done and why - bit easier than doing it here in writing :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nadineloepfe @exploreriii : Great! Let me know what days and times work for everyone!
I will be available at certain points today. I will not be available tomorrow. I will be available again on Friday :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nadineloepfe, @exploreriii
What days and times work best for you this week?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am available most days UTC mornings or early afternoons, as well as late evenings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets sync tonight on the Python call? @exploreriii @aceppaluni
|
Hello, this is the Office Hour Bot. This is a reminder that the Hiero Python SDK Office Hours are scheduled in approximately 4 hours (14:00 UTC). This session provides an opportunity to ask questions regarding this Pull Request or receive assistance from a maintainer. Details:
Disclaimer: This is an automated reminder. Please verify the schedule here to be notified of any changes. |
…ion flow (hiero-ledger#362) Signed-off-by: Angelina <aceppaluni@gmail.com>
f521241 to
9ba013e
Compare
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aceppaluni please check as your test are failing eg
_________________ test_before_execute_payment_not_required ___________________
query = <hiero_sdk_python.query.account_balance_query.CryptoGetAccountBalanceQuery object at 0x7f2ba8111cd0>
mock_client = <hiero_sdk_python.client.client.Client object at 0x7f2ba8112d50>
def test_before_execute_payment_not_required(query, mock_client):
"""Test _before_execute method setup for query that doesn't require payment"""
# payment_amount is None, should not set payment_amount
query._before_execute(mock_client)
assert query.node_account_ids == mock_client.get_node_account_ids()
E assert [] == [AccountId(sh...alm=0, num=3)]
E
E Right contains one more item: AccountId(shard=0, realm=0, num=3)
E
E Full diff:
E + []
E - [
E - AccountId(shard=0, realm=0, num=3),
E - ]
tests/unit/test_query.py:46: AssertionError
_____________________ test_before_execute_payment_required _____________________
query_requires_payment = <hiero_sdk_python.query.token_info_query.TokenInfoQuery object at 0x7f2ba8559850>
mock_client = <hiero_sdk_python.client.client.Client object at 0x7f2ba8113590>
def test_before_execute_payment_required(query_requires_payment, mock_client):
"""Test _before_execute method setup for query that requires payment"""
# get_cost() should return Hbar(2)
mock_get_cost = MagicMock()
mock_get_cost.return_value = Hbar(2)
query_requires_payment.get_cost = mock_get_cost
# payment_amount is None, should set payment_amount to 2 Hbars
query_requires_payment._before_execute(mock_client)
assert query_requires_payment.node_account_ids == mock_client.get_node_account_ids()
E assert [] == [AccountId(sh...alm=0, num=3)]
E
E Right contains one more item: AccountId(shard=0, realm=0, num=3)
E
E Full diff:
E + []
E - [
E - AccountId(shard=0, realm=0, num=3),
E - ]
tests/unit/test_query.py:60: AssertionError
=========================== short test summary info ============================
FAILED tests/unit/test_query.py::test_before_execute_payment_not_required - assert [] == [AccountId(sh...alm=0, num=3)]
Right contains one more item: AccountId(shard=0, realm=0, num=3)
Full diff:
- []
- [
-
AccountId(shard=0, realm=0, num=3), - ]
FAILED tests/unit/test_query.py::test_before_execute_payment_required - assert [] == [AccountId(sh...alm=0, num=3)]
Right contains one more item: AccountId(shard=0, realm=0, num=3)
Full diff:
- []
- [
-
AccountId(shard=0, realm=0, num=3), - ]
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
…election Signed-off-by: Angelina <aceppaluni@gmail.com>
…ion flow (hiero-ledger#362) Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
Signed-off-by: Angelina <aceppaluni@gmail.com>
9ba013e to
a0f96ad
Compare
|
@exploreriii @nadineloepfe Since the tests were failing I did need to modify test_query.py |
|
Please push the new changes if you are happy with them and lets run the tests here 👍 |
|
@exploreriii I pushed the changes and it corrected those first few failing tests. Seems as though another is failing : test_query_retry_on_busy |
|
Hi! @nadineloepfe @exploreriii , |
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aceppaluni looking at https://github.com/hiero-ledger/hiero-sdk-python/pull/362/files
it is clear that you've not added the new functionality, please try to copy/paste it again now that a rebase isn't required, it should work easier
There are also errors such as deleted lines from a rebase - sorry!!
|
@exploreriii |
|
try it again please and see if it works 👍 |
Description:
Add Set_node_account_ids() method to Query and Transaction for retrieving receipts or records.
Related issue(s):
Fixes #86
Notes for reviewer:
Ran tests for both Query and Transaction
Checklist