-
Notifications
You must be signed in to change notification settings - Fork 3
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
API client: refactoring #42
Comments
cdboer
added a commit
that referenced
this issue
May 16, 2021
Rename GitlabAPIClient to GitlabClient Export URL building into its own method in GitlabClient Rework URL building, splitting path and query building into their own methods Rename alru_cache to just cache as it does not represent an asynchronous least recently used cache and is used as a "one time store" cache Add the ability to change the project path of the GitlabClient without having to reinstantiate the URLBuilder Rely on the group_by function to sort results added to gitlab2prov/utils/__init__.py
cdboer
added a commit
that referenced
this issue
May 16, 2021
The group_by function is used to match page results back to their appropriate request url's. It is also used to regroup request results such as issue note awards. For example: The GitlabClient is supposed to return a list of issue note awards for each issue of a project, but it can only request a list of awards for each issue note. To regroup the awards such that there is a list of awards for each issue and not for each issue note, one can use the group_by function and pass a group_size_index that reflects how many issue notes there are on each inbdividual issue.
cdboer
added a commit
that referenced
this issue
May 16, 2021
cdboer
added a commit
that referenced
this issue
May 16, 2021
cdboer
added a commit
that referenced
this issue
May 16, 2021
Rewrite of RequestHandler: Requests are now queued on demand. Added pagination fallback to the key 'x-next-page' to not solely rely on 'x-total-pages'. Add initial exception system, see TODO notes. Exceptions are supposed to be handled in the GitlabClient methods.
cdboer
added a commit
that referenced
this issue
May 27, 2021
cdboer
added a commit
that referenced
this issue
May 27, 2021
cdboer
added a commit
that referenced
this issue
May 27, 2021
cdboer
added a commit
that referenced
this issue
May 27, 2021
cdboer
added a commit
that referenced
this issue
May 27, 2021
Makes it more obvious that the request queue does not hold request urls but rather request coroutines that have to be awaited to be executed. The queued coroutines are awaited in a asyncio.gather statement.
cdboer
added a commit
that referenced
this issue
May 27, 2021
Issue will be closed, when v1.0 is merged into main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: