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

Gdrive hotfix #497

Merged
merged 5 commits into from
Aug 19, 2023
Merged

Gdrive hotfix #497

merged 5 commits into from
Aug 19, 2023

Conversation

alex-rakowski
Copy link
Collaborator

Quick fix for py4DSTEM.io.gdrive_download, that allows passing just the google drive id to the function and passing to gdown.download correctly

example that works

id_ = '1AWB3-UTPiTR9dgrEkNFD7EJYsKnbEy0y'
py4DSTEM.io.gdrive_download(
    id_= id_,
    destination = '/content/',
    filename = 'polycrystal_2D_WS2.h5',  
)

Copy link
Collaborator Author

@alex-rakowski alex-rakowski left a comment

Choose a reason for hiding this comment

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

now allows for the following to be run:

# correct download link
py4DSTEM.io.gdrive_download(
    id_ = 'https://drive.google.com/uc?id=1AWB3-UTPiTR9dgrEkNFD7EJYsKnbEy0y',
    destination = '/content/',
    filename = 'polycrystal_2D_WS2.h5',
    overwrite=True
)

# google drive file link
py4DSTEM.io.gdrive_download(
  "https://drive.google.com/file/d/1AWB3-UTPiTR9dgrEkNFD7EJYsKnbEy0y",
  destination = "/content/",
  filename = "polycrystal_2D_WS2.h5",
  overwrite = True
)


# google drive file ID 
py4DSTEM.io.gdrive_download(
    id_ = '1AWB3-UTPiTR9dgrEkNFD7EJYsKnbEy0y',
    destination = '/content/',
    filename = 'polycrystal_2D_WS2.h5',
    overwrite=True
)

# special list of pre defined files
py4DSTEM.io.gdrive_download(
    id_='polycrystal_2D_WS2',
    destination='/content/',
    overwrite=True
)

@sezelt sezelt merged commit b71e7b8 into dev Aug 19, 2023
@sezelt sezelt deleted the gdrive_hotfix branch August 19, 2023 17:36
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