-
Notifications
You must be signed in to change notification settings - Fork 51
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
Migrate from tzstats to tzpro #685
Conversation
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
…lder Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>
Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>
Yep it works for us. Thank you. |
Any reasons for this migration? Update tzstats going to be deprecated:
|
It was deprecated and replaced. Here is the migration guide. Tzstats does not exist anymore: |
Ok got it. Thanks for the context. |
I tired to catch absolutely every occurance of tzstats and also renamed the folder to blockwatch (the company behind it) in order to pave the way to include new API Interfaces later (if needed) |
try: | ||
key = os.getenv("TZPRO_API_KEY") | ||
except: | ||
verbose_logger.exception("Unable to load TZPRO_API_KEY from .env file!") |
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.
How about we add the api key to the command line when using tzpro instead of forcing the user to create a .env file? We are currently not using envríronmental variables anywhere in the project.
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.
We might wanna setup then a test api key for our test pipeline. For that we might use the secrets manager of github actions.
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.
We have a config file, we put api for twitter and other in it, why not use it. Why spread the config.
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.
Even better :)
@jdsika can I push commits on this PR? |
yes, please! I am on erics side to put it in the config. I did not think about (stupid) |
Not ready yet. I am fixing the tests now. DO NOT MERGE! |
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.
There are still some failing tests due to API updates which needs further investigation and is out of scope for this PR. I also noticed that the enum comparisons are not working correctly and I am not sure why. E.g. payment_item.paid == PaymentStatus.PAID
is false
but payment_item.paid.is_paid()
is true
. That's really confusing. Best way to compare enums would be to compare their values for now:
payment_item.paid.value == PaymentStatus.PAID.value
Currently failing tests:
- test_attempt_single_batch_tz
- test_attempt_single_batch_KT
- test_batch_payer_total_payout_amount
- test_simulate_single_operation
- test_failed_simulate_single_operation
- test_reset
- test_archive
Effort: 8h
Work effort: 6h