Skip to content

Add notebook tutorial for using the Drive Python client.#25

Closed
orendain wants to merge 3 commits into
mainfrom
eo/drive-notebook
Closed

Add notebook tutorial for using the Drive Python client.#25
orendain wants to merge 3 commits into
mainfrom
eo/drive-notebook

Conversation

@orendain

@orendain orendain commented Aug 9, 2023

Copy link
Copy Markdown
Member

Adds a notebook guiding users through the different features of the Drive Python client.

Rendered view for convenience: https://github.com/h2oai/haic-tutorials/blob/eo/drive-notebook/6%20Drive:%20Python%20Client.ipynb

Important

The author still needs to verify that this notebook indeed runs as intended on the latest Managed Cloud offering. The PR will come out of draft mode when completed.

✅ The notebook has been verified against the latest Managed Cloud offering currently in queue for release.

@orendain orendain self-assigned this Aug 9, 2023
@orendain orendain marked this pull request as ready for review August 30, 2023 15:37
@orendain orendain requested a review from mtanco August 30, 2023 15:38

@mtanco mtanco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall this is amazing! I have just a few comments, which I will not do in-line as that's hard for notebooks

  1. "nice to have" the other notebooks in this repo use get pass instead of import urllib.parse, that might be nice to be more consistent
  2. Do we allow users to access Managed Cloud drive from their local machine? I think not. we should add a note that this will only run in notebooks in the cloud (if that is the case). and if that IS the case, we could use the MC platform token variable instead of having to click the link?
  3. I like the custom buckets section, thank you for keeping that in. If I try to create a custom bucket that already exists, I am allowed to... 😱 but then the list command fails with an authorization error. I changed the name to have my initials and then listing on the it worked. Maybe the tutorial can append a random number?
  4. Should we delete the custom bucket? Is it bad to have 100 demo test buckets???

…ooks, for consistency.

Added note that notebook only runs on the cloud.

Randomized custom bucket names.

Added cleanup of files that were pushed but never deleted.
@orendain

orendain commented Sep 27, 2023

Copy link
Copy Markdown
Member Author
  1. "nice to have" the other notebooks in this repo use get pass instead of import urllib.parse, that might be nice to be more consistent

You got it - done.

  1. Do we allow users to access Managed Cloud drive from their local machine? I think not. we should add a note that this will only run in notebooks in the cloud (if that is the case).

Sounds good - done.

... and if that IS the case, we could use the MC platform token variable instead of having to click the link?

I wasn't able to find a platform token (or anything that would let us skip the link stage) in any variable in the environment (specifically, no where in os.environ). Happy to make the change if you can provide guidance on how to retrieve it.

If I try to create a custom bucket that already exists, I am allowed to... 😱 but then the list command fails with an authorization error. I changed the name to have my initials and then listing on the it worked. Maybe the tutorial can append a random number?

Great catch, thank you! I've randomized the name so as to avoid name collisions.

Should we delete the custom bucket? Is it bad to have 100 demo test buckets???

Great idea. Unfortunately, there will need to be a few changes to enable. I've opened a corresponding feature request (not linked here as it leads to a non-public repo).

Also added cleanup to remove demo test files that were written but not deleted.

@orendain orendain requested a review from mtanco September 27, 2023 22:27
@orendain

Copy link
Copy Markdown
Member Author

This notebook has been updated once again with the latest features, including automatic ("authless") connection to Drive.

@orendain

Copy link
Copy Markdown
Member Author

@orendain orendain closed this Dec 18, 2024
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