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 AlephClient classes #65

Merged
merged 6 commits into from
Oct 23, 2023
Merged

Refactor AlephClient classes #65

merged 6 commits into from
Oct 23, 2023

Conversation

MHHukiewitz
Copy link
Member

@MHHukiewitz MHHukiewitz commented Oct 5, 2023

This PR is in preparation for the alpha release of v0.8.0 and contains all changes to the client's interface that are intended for the breaking release v0.8.0.

src/aleph/sdk/base.py Show resolved Hide resolved
src/aleph/sdk/base.py Outdated Show resolved Hide resolved
src/aleph/sdk/base.py Show resolved Hide resolved
src/aleph/sdk/client.py Outdated Show resolved Hide resolved
src/aleph/sdk/client.py Outdated Show resolved Hide resolved
src/aleph/sdk/models/common.py Outdated Show resolved Hide resolved
src/aleph/sdk/models/message.py Outdated Show resolved Hide resolved
src/aleph/sdk/models/post.py Outdated Show resolved Hide resolved
src/aleph/sdk/models/post.py Outdated Show resolved Hide resolved
tests/integration/config.py Show resolved Hide resolved
@MHHukiewitz
Copy link
Member Author

MHHukiewitz commented Oct 7, 2023

I refactored the package structure quite substantially here now, so not only we do now have a aleph.sdk.model module, containing all the Post, Message and Filter models, but also turned aleph.sdk.client into a module, following @hoh's suggestion.

@hoh hoh force-pushed the mhh-base-client-0.8.0-alpha.1 branch 2 times, most recently from 47c32d0 to 2e9878f Compare October 10, 2023 15:43
@hoh
Copy link
Member

hoh commented Oct 23, 2023

The diff looks good 👍 . Can you rebase the commits to have clear atomic changes that follow our git commit style ?

MHHukiewitz and others added 6 commits October 23, 2023 13:13
… methods; Client classes are bloated and have unused parameters

Solution: add MessageFilter & PostFilter; remove limit parameter;
…; aggregate fetching could result in unhandled parsing errors

Solution: Adjust integration tests for current functionality; add raise_for_status to GET aggregates requests
…es and their contained functions did not correspond to another

Solution: refactor client.py into own module; rename pagination to page_size where possible; refactor models module
…slow down performance

Solution: Prevent unnecessary .as_http_params() calls
…els module is too broad of a name; client module classes had unclear naming

Solution: Restructure and remove the sync wrapper; Move models' functions into new query module and existing files; Rename client classes
Solution: Debug examples and only use async client
@hoh hoh changed the title Breaking: Final changes to BaseAlephClient for v0.8.0a1 Refactor AlephClient classes Oct 23, 2023
@hoh hoh merged commit a13e844 into main Oct 23, 2023
10 checks passed
@hoh hoh deleted the mhh-base-client-0.8.0-alpha.1 branch October 23, 2023 12:29
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.

2 participants