Skip to content

[CR] Waterbutler OneDrive Plugin#151

Closed
caseyrygt wants to merge 95 commits intoCenterForOpenScience:developfrom
caseyrygt:feature/onedrive-provider-35
Closed

[CR] Waterbutler OneDrive Plugin#151
caseyrygt wants to merge 95 commits intoCenterForOpenScience:developfrom
caseyrygt:feature/onedrive-provider-35

Conversation

@caseyrygt
Copy link
Contributor

@felliott: This is ready for you to review.

Could you please review the copy functionality? OneDrive's "Copy" function is asynchronous (the other methods are not) and requires the client to check the status of the copy job in order to know when it has completed. If there's a better way than a for loop to check the OneDrive job status, please let me know.

Thanks!

…orks with a single file in the project root folder; todo: test upload to subfolder
i = 0
status = None

while (i < settings.ONEDRIVE_COPY_INTERATION_COUNT):
Copy link
Member

Choose a reason for hiding this comment

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

Typo: INTERATION => ITERATION. Ditto in settings.py.

names = od_path.file_path(data)
ids = od_path.ids(data)

wb_path = WaterButlerPath(names, _ids=ids, folder=path.endswith('/'))
Copy link
Member

Choose a reason for hiding this comment

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

Return a OneDrivePath here.

@felliott
Copy link
Member

I think the OneDrivePath code might need a rework. Except for validate_v1_path and validate_path, the path argument to the methods you've implemented should always be an instance of OneDrivePath. It's okay for you to provide OneDrive-specific implementations of WaterButlerPath methods. one_drive_parent_folder should probably be parent and operate on self. I'm not entirely sure but it looks file_path and ids are doing double-duty as constructors and accessors. You might replace them with a _build_from_onedrive_response(self, data) class method that builds a new OneDrivePath object. Then, the accessor functionality of those methods come from the WaterButlerPath.parts. Also, WaterButlerPath has a from_parts class method that lets you build a new path object from an existing objects parts.

@felliott
Copy link
Member

Closing in favor of #205, which extends the work done in this PR. Thanks, @caseyrygt!

@felliott felliott closed this Aug 29, 2017
felliott added a commit that referenced this pull request Nov 13, 2017
 This feature was done as a COS-funded Integration Grant by:
  * Ryan Casey (@caseyrygt)

 Additional work was done on read-write support by Alexandr Melnikov
 (@alexandr-melnikov-dev-pro).  Read-write will be added in a future
 release.

 Thank you both for all your hard work on this!

 [SVCS-269] [SVCS-458]
 Closes: #205
 Related: #102, #151, #177
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