Skip to content

Revert: Google drive connection method to config token based approach#553

Merged
cs7-shrey merged 5 commits into
neuroinformatics-unit:add_gdrive_aws_remotefrom
cs7-shrey:revert_gdrive_connection_method
Aug 1, 2025
Merged

Revert: Google drive connection method to config token based approach#553
cs7-shrey merged 5 commits into
neuroinformatics-unit:add_gdrive_aws_remotefrom
cs7-shrey:revert_gdrive_connection_method

Conversation

@cs7-shrey
Copy link
Copy Markdown
Collaborator

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Reverting back to config token based approach for google drive connections as google cloud had some policy changes

What does this PR do?
Include back the config token method of setting up google drive connections in absence of a browser.

References

Please reference any existing issues/PRs that relate to this PR.

How has this PR been tested?

Tested locally

Is this a breaking change?

No

Does this PR require an update to the documentation?

No

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit


# TODO: make this more robust
# extracting rclone's message from the json
output_json = json.loads(output.stdout)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could this be added to a TODO on the main PR or feel free to make an issue if its a longer-term problem that is outside the scope of PRs (typically, TODOs in the code itself end up being forgotten about)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Actually, we discussed about this TODO in the first version of the original PR when the rclone commands I used were relatively new. I copied some of the code from that commit so this TODO was also copied over. Back then, we agreed that most probably this should work as expected and that we can check how robust it is while testing. So, do you suggest I should remove it or just keep it as a reminder?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay great @cs7-shrey, I think this could be a reminder on a PR (e.g. you can maintain a TODO list on the PR itself if useful) for us to test, and we can delete from the code. Feel free to merge after, thanks!

@JoeZiminski
Copy link
Copy Markdown
Member

Hey @cs7-shrey cheers for this it all looks good to me, there were a couple of cases where the new option to have central_path as None needed handling, I have fixed these here and added #554 to handle this case more robustly down the line. However I think the fix is okay for now if you are happy with it.

I left one comment on the TODO (feel free to open an issue for things that aren't quick fixes or are outside the scope of the PR). once the TODO is deleted and tests are finished running feel free to merge! (if you have permission, if not let me know).

* Add get_rclone_config_name_local and rename get_rclone_config_name to get_rclone_config_name_central.

* Add new transfer function.

* Fix rename in tests.

* Tidy up the search functions.

* Fix circular import.

* Adding more tests and fixing an edge case.

* Add wildcards to local filesystem transfer tests.

* Added tests to ssh.

* Remove unused function.

* Move teardown to fix tests on macos.

* Revert get_rclone_config_name_central name change.

* Add documentation to tests.

* Remove unecessary sorted.

* Fix cyclical import.

* Remove unecessary wildcard.

* Remove unused functions.
@cs7-shrey cs7-shrey force-pushed the revert_gdrive_connection_method branch from cb30ecf to bef1d3d Compare July 31, 2025 16:09
@cs7-shrey cs7-shrey merged commit 5899eca into neuroinformatics-unit:add_gdrive_aws_remote Aug 1, 2025
30 of 38 checks passed
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