Skip to content
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

[FEAT] Bumps to web3 v6, adds linters, adds tests (pending upstream merge) #55

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

8ball030
Copy link

@8ball030 8ball030 commented Oct 11, 2023

This pr is to (Hopefully) bump balpy to web3.py > v5

There are a number of dependants which would need to be merged and released;

gerrrg/multicaller#1

I am very sorry about the size of this pr i got a little carried away.

However, it does accomplish few things and fixes a few bugs caught by the now introduced linters.

Features.

-> formatters to fix the incostent tabs and spaces issues, sort imports and format with black.

-> linters: -> autopep8

-> test suite: demonstrates functionality of the subgraph queries to allow for tests.

-> dev group for dependencies.

Probably a bit too aggressive i again apologies.

@8ball030 8ball030 changed the title Bumps to web3 v6 [WIP] Bumps to web3 v6 Oct 11, 2023
Comment on lines +33 to +34
# checkout submodules
git submodule update --init --recursive
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in the docs atm, might need to add the compile step too

Comment on lines -100 to -101
stringError = str('{}'.format(error));
if "BAL#" in stringError:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mixed tabs and whitespaces

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if this should be a submodule as well?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some history around this -- it used to be a standalone package, was briefly a submodule, then was directly thrown into the package when the previous maintainer said they had no plans to make any future updates. It seemed safer to just move it into balpy to have the freedom to update as needed.

That being said, I am not aware of anyone using it, and the packages do have some errors in them. I've had someone find some notable issues in the stable math library, and the way that the "pools" themselves are structured is incorrect.

At this point, it might just make sense to remove them entirely, at least for now. It probably doesn't sense to move these files forward knowing that they have accuracy/implementation issues

requests="2.25.1"
eth-abi="2.1.1"
gql="2.0.0"
multicaller=">=0.0.0a10"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pending the hopeful merge of;

gerrrg/multicaller#1

Which would allow this to then be used

Comment on lines 47 to 48
if not tokens:
raise ValueError("No tokens provided in swap")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is when the swap is not found in the router

test:
poetry run pytest tests

all: fmt lint test
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consistent formatting and linting

Comment on lines +7 to +12
def test_get_pool_ids():
get_pool_ids(TEST_NETWORK)


def test_get_pools():
get_pools(TEST_NETWORK)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests for the graph queries.

@8ball030 8ball030 changed the title [WIP] Bumps to web3 v6 [ Bumps to web3 v6, adds linters, adds tests Oct 11, 2023
@8ball030 8ball030 changed the title [ Bumps to web3 v6, adds linters, adds tests [FEAT] Bumps to web3 v6, adds linters, adds tests (pending upstream merge) Oct 11, 2023
@8ball030 8ball030 mentioned this pull request Oct 13, 2023
gql=">=2.0.0"
jstyleson=">=0.0.2"
web3="~6"
multicaller = {path = "../multicaller"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo use version number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants