Skip to content

[WIP] Document Method #1797

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

Closed
wants to merge 3 commits into from
Closed

Conversation

kclowes
Copy link
Collaborator

@kclowes kclowes commented Nov 21, 2020

What was wrong?

Method needed some documentation to be used by outside parties.

Related to Issue #1755

How was it fixed?

Added some documentation!

Todo:

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

Copy link
Member

@pipermerriam pipermerriam left a comment

Choose a reason for hiding this comment

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

I think you should do some experiments on how these APIs could be simplified/streamlined before documenting the current API. My guess is that we can find a cleaner more intuitive way to do this.

@pipermerriam
Copy link
Member

Experiments that come to mind:

  1. Is there a class-based way to do this. A base class that requires you override certain methods...
  2. Is there a decorator based way that really simple methods could be written.
  3. Are there utilities that we can write that could simplify method creation. Can we make a "Recipe" or "template" that could be copy/pasta to simplify method creation.

@kclowes
Copy link
Collaborator Author

kclowes commented Nov 30, 2020

Yeah, good idea. I was thinking about that as I was documenting it. I'll play around with some of those options! It seems like the base class would be the most straightforward so I'll probably start there first, but a decorator might be nice too 🤔

@pipermerriam
Copy link
Member

Worth noting that these options don't necessarily require reworking the existing API. Maybe it makes sense to build them as a layer on top of it? Or to build it as a layer on top of it and then re-factor the middle part once you know the new layer works... Otherwise you'll be up against refactoring all the work you just did while also trying to refactor the API itself....

@fselmo
Copy link
Collaborator

fselmo commented Jul 8, 2022

@marcgarreau I think we could use some related material from the web3 customization blog post and revamp the documentation around Method and attaching methods here to modernize this issue a bit more. I realized we didn't really update the docs after adding that feature in. Thoughts?

@kclowes
Copy link
Collaborator Author

kclowes commented Sep 12, 2022

Closing - no longer relevant. There is a nice blog post here: https://snakecharmers.ethereum.org/web3-py-patterns-customizations/

@kclowes kclowes closed this Sep 12, 2022
@kclowes kclowes deleted the document-method branch September 12, 2022 18:41
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.

3 participants