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/google next #700

Merged
merged 8 commits into from
Dec 19, 2024
Merged

Feat/google next #700

merged 8 commits into from
Dec 19, 2024

Conversation

gcharest
Copy link
Contributor

@gcharest gcharest commented Dec 18, 2024

Summary | Résumé

Refactoring for Simplification and Optimization

The google_next module refactors the service and directory functions to simplify and optimize the codebase. Focuses on reducing redundancy, improving readability, and enhancing maintainability. It will gradually replace the google_workspace as modules are updated.

Service Initialization

The get_google_service function in google_next/service.py is streamlined to handle authentication and service initialization more efficiently. Directly returns the authenticated service resource without additional complexity.

Error Handling

The handle_google_api_errors decorator in google_next/service.py is simplified to more easily log warnings and errors, providing better insights into issues.

API Call Execution

The execute_google_api_call function is updated to receive an initialized service resource as an argument, allowing for more flexibility in API call execution and better performance (no need to re-authenticate for each call).

Directory Functions

The directory functions in google_next/directory.py are refactored to simplify the code and improve readability. The functions are streamlined to reduce redundancy and improve consistency in handling directory operations.

The list_groups_with_members function is enhanced to handle member retrieval and error handling more effectively, clearly listing groups and members where an API call raised an error as part of the returned values.

@gcharest gcharest requested a review from a team December 18, 2024 16:30
@gcharest gcharest self-assigned this Dec 18, 2024
@gcharest gcharest enabled auto-merge (squash) December 18, 2024 16:31
@gcharest gcharest disabled auto-merge December 18, 2024 16:31
@gcharest gcharest merged commit fc2a7bb into main Dec 19, 2024
8 checks passed
@gcharest gcharest deleted the feat/google_next branch December 19, 2024 14:39
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