-
Notifications
You must be signed in to change notification settings - Fork 1
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
Release V0.9.1: Allow import of graph files when imported from other scripts #233
Conversation
@gosuto-inzasheru some other places where I am including this are crashing when trying to build the core pools data. So this PR tries to make the pathing a bit robust (although build_core_pools still seems to be crashing when you run it from an import), and uses the cached core pools unless you explicitly ask it otherwise. |
This still isn't working. Have to figure out how to get setup.py to include the gql files when you import the package. |
Example successful run from another repo. https://github.com/BalancerMaxis/protocol_fee_allocator/actions/runs/8332269118 |
@gosuto-inzasheru ok this all looks good to me now, except the core pools tests are failing. A bit unsure/unclear on that. |
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.
works now as a standalone!
Python 3.10.10 (main, Jul 7 2023, 13:26:12) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import bal_addresses
>>> b = bal_addresses.pools_gauges.BalPoolsGauges('mainnet', False)
Pool 0x2191df821c198600499aa1f0031b1a7514d7a7d9000200000000000000000639 on mainnet has no preferential gauge
Pool 0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080 on mainnet has no preferential gauge
Pool 0xb9debddf1d894c79d2b2d09f819ff9b856fca55200000000000000000000062a on mainnet has no preferential gauge
>>> b.
b.build_core_pools() b.get_gauge_deposit_shares( b.is_core_pool(
b.chain b.get_last_join_exit( b.is_pool_exempt_from_yield_fee(
b.core_pools b.get_liquid_pools_with_protocol_yield_fee() b.query_preferential_gauges(
b.get_bpt_balances( b.has_alive_preferential_gauge( b.subgraph
@gosuto-inzasheru https://github.com/BalancerMaxis/bal_addresses/actions/runs/8349543802/job/22853956890 Are you sure all the subgraph host urls are resolving correctly? Maybe also just a downtime, can try running gen_addressbooks on this branch again later. |
@gosuto-inzasheru ok so that seemed to just be temporary. Ran again later and it worked, but core pools still failing due to trying to generate on testnets. I'm kinda finsihing up for the day, so won't get ot this today, but can take a look tomororw (afternoon/evenint CET) if you haven't figured it out yet. We're getting close I think to getting a few of these guys merged. |
sorted testnet issues, action runs successfully now: https://github.com/BalancerMaxis/bal_addresses/actions/runs/8356226775/job/22872904183 |
…es' into relative_pathing_for_graph_queries
Scheduled update from changes to monorepo
# Conflicts: # bal_addresses/pools_gauges.py # gen_core_pools.py
…es' into relative_pathing_for_graph_queries # Conflicts: # outputs/core_pools.json
Test results after merging in main with root gauges addition and dealign with merge conflicts: |
@gosuto-inzasheru is it me or are the tests just failing cuz teh arbi subgraph is flakey? |
Looking into it more seems like python 3.9 doesn't work anymore. I think this is probably somewhat important as it is used in places. Maybe we just need to get over that. |
Ok dug in a bit more. It looks liek the issue here is that the gql client library we are using to fetch these gql files is not working with python v3.9. Some thoughts on this:
|
i think you are right, arbitrum subgraph was wonky. tests pass now without issue, also on python 3.9 |
@gosuto-inzasheru you just merged this, but we didn't deal with the gql, v3.9 problem. |
i cant reproduce. this is in a fresh env using latest commit on main branch, installed as a standalone:
|
also tests are passing on python 3.9. can you give a reproducable situation, or write a test that highlights the issue you are talking about? |
Hmm you're right. Yesterday 3.9 was failing with somehow not getting json data from some reqeust call I thought, but I can't find those runs in the jobs and they seem to be passing now. Will tag this and test it a bit. Thanks. |
Please squash merge