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

refactor: move methods implemented in Client to corresponding Backend methods #3017

Closed
datapythonista opened this issue Sep 25, 2021 · 2 comments
Labels
backends Issues related to all backends refactor Issues or PRs related to refactoring the codebase

Comments

@datapythonista
Copy link
Contributor

xref #2678

Follow up of discussion in #3014

Seems like it's quite challenging at this point to make Backend.connect() methods return an instance of `Backend. See this comment for a list of the possible options we've got.

Regardless of implementing this particular change (making connect return Backend instead of Client), we've been working on moving methods from Client classes to Backend classes, and then creating a proxy method in Client that calls the method in the new location. This was done while standardizing the API.

A first step towards the new backend API structure would be to finish moving all the remaining methods. This will need to eventually be done. And even if we don't fully remove Client, or if the API is not fully specified or standard, it'll greatly simplify the code of backends having all methods in the same classes, and not arbitrarily split between Client and Backend.

To move forward with this approach, the next PRs will be open:

  • Delegate all objects not found in Client to the corresponding Backend instance
  • Move methods from Client classes into Backend, one backend at a time
@datapythonista datapythonista added refactor Issues or PRs related to refactoring the codebase backends Issues related to all backends labels Sep 25, 2021
@cpcloud cpcloud changed the title Move methods implemented in Client to corresponding Backend methods refactor: move methods implemented in Client to corresponding Backend methods Dec 28, 2021
@cpcloud
Copy link
Member

cpcloud commented Jan 18, 2022

Partially addressed by #3127.

@cpcloud
Copy link
Member

cpcloud commented Jan 18, 2022

@datapythonista Does #3127 fully address this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backends Issues related to all backends refactor Issues or PRs related to refactoring the codebase
Projects
None yet
Development

No branches or pull requests

2 participants