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

Add Google Drive Permissions + Files services #66

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

lucasgomide
Copy link
Contributor

This PR adds acouple of Google Drive services to handle basic file operations, such as granting permissions and managing files

@lucasgomide lucasgomide requested a review from joaodaher March 23, 2025 17:32
@lucasgomide lucasgomide force-pushed the feat/add-drive-services branch from e0052fd to 9276f9f Compare March 23, 2025 17:34
@coveralls
Copy link

coveralls commented Mar 23, 2025

Coverage Status

coverage: 30.986% (+1.6%) from 29.418%
when pulling 5cfc01f on feat/add-drive-services
into 3f5df39 on main.

@@ -1,16 +1,55 @@
# Reference: https://developers.google.com/drive/api/reference/rest/v3

from gcp_pilot.base import GoogleCloudPilotAPI

from gcp_pilot.base import DiscoveryMixin, GoogleCloudPilotAPI

class Drive(GoogleCloudPilotAPI):
Copy link
Contributor

Choose a reason for hiding this comment

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

Since Drive cannot be used directly, maybe extend from abc.ABC?

Copy link
Contributor Author

@lucasgomide lucasgomide Mar 26, 2025

Choose a reason for hiding this comment

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

actually it can be used directly. Someone can initialize it and use service.client, since this class defines the required scope and the service porperly.

Copy link
Contributor

Choose a reason for hiding this comment

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

But without any methods, it's useless, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well kind of, I would say. It might not be recommended to use directly given our coding-style and purpose.. but as I mentioned before it could still be useful for someone who wants to use a non supported Drive service

we have two options - just to make sure their W/S
a) extends from abc: by preventing "standalone" usage of Drive
or
b) do not extends: allow anyone to use Drive freely

I don't have preferences, I’m slightly inclined toward option b

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd lean towards (a) to align with gcp-pilot's purpose: friendlier wrapper.
Anyone can still use the Drive if it extends to its own class, just like you are already doing with some resources.

@lucasgomide lucasgomide force-pushed the feat/add-drive-services branch from 9276f9f to fc5fbcf Compare March 26, 2025 00:35
@lucasgomide lucasgomide force-pushed the feat/add-drive-services branch from fc5fbcf to d11f035 Compare March 26, 2025 02:47
@lucasgomide lucasgomide force-pushed the feat/add-drive-services branch from d11f035 to 5cfc01f Compare March 26, 2025 02:51
@lucasgomide
Copy link
Contributor Author

@joaodaher PR updated I addressed most of the comments

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