Duke-GCB / DukeDSClient

Command line program to allow uploading, downloading, and managing projects in the duke-data-service.
MIT License
5 stars 6 forks source link

Adds move and rename to DukeDS sdk methods #247

Closed johnbradley closed 5 years ago

johnbradley commented 5 years ago

Adds methods to rename and move files

DukeDS.move_file(< project_name >, < file_remote_path >, < parent_remote_path >)

DukeDS.rename_file(< project_name >, < file_remote_path >, < name >)

These methods also work for folders as well.

Adds sdk.Client method to find a project by name

Client().get_project_by_name(< project_name >)

Fixes part of #243

johnbradley commented 5 years ago

Updated Summary

Includes changes based on comments above and feedback from users.

Adds method to rename/move files

DukeDS.move_file_or_folder(< project_name >, < source_remote_path >, < target_remote_path >)

This method works for folders as well.

Adds sdk.Client method to find a project by name

Client().get_project_by_name(< project_name >)

Fixes bug in DukeDS. upload_file

The create_upload parameter is now storage_provider_id so this method needed to be updated. https://github.com/Duke-GCB/DukeDSClient/blob/0361e1fc9ddf501deb5a438186415c62a1d6adb1/ddsc/sdk/client.py#L193-L195