@@ -158,11 +158,34 @@ def setup_rclone_config_for_ssh(
158158
159159def setup_rclone_config_for_gdrive (
160160 cfg : Configs ,
161- gdrive_client_secret : str | None ,
162161 rclone_config_name : str ,
162+ gdrive_client_secret : str | None ,
163163 config_token : Optional [str ] = None ,
164164 log : bool = True ,
165165):
166+ """
167+ Sets up rclone config for connections to Google Drive. This must
168+ contain the `gdrive_root_folder_id` and optionally a `gdrive_client_id`
169+ which also mandates for the presence of a Google Drive client secret.
170+
171+ Parameters
172+ ----------
173+
174+ cfg : Configs
175+ datashuttle configs UserDict.
176+
177+ rclone_config_name : rclone config name
178+ canonical config name, generated by
179+ datashuttle.cfg.get_rclone_config_name()
180+
181+ gdrive_client_secret : Google Drive client secret, mandatory when
182+ using a Google Drive client.
183+
184+ config_token : a token to setup rclone config without opening a browser,
185+ needed if the user's machine doesn't have access to a browser.
186+
187+ log : whether to log, if True logger must already be initialised.
188+ """
166189 client_id_key_value = (
167190 f"client_id { cfg ['gdrive_client_id' ]} "
168191 if cfg ["gdrive_client_id" ]
@@ -202,10 +225,28 @@ def setup_rclone_config_for_gdrive(
202225
203226def setup_rclone_config_for_aws (
204227 cfg : Configs ,
205- aws_secret_access_key : str ,
206228 rclone_config_name : str ,
229+ aws_secret_access_key : str ,
207230 log : bool = True ,
208231):
232+ """
233+ Sets up rclone config for connections to AWS S3 buckets. This must
234+ contain the `aws_access_key_id` and `aws_region`.
235+
236+ Parameters
237+ ----------
238+
239+ cfg : Configs
240+ datashuttle configs UserDict.
241+
242+ rclone_config_name : rclone config name
243+ canonical config name, generated by
244+ datashuttle.cfg.get_rclone_config_name()
245+
246+ aws_secret_access_key : the aws secret access key provided by the user.
247+
248+ log : whether to log, if True logger must already be initialised.
249+ """
209250 output = call_rclone (
210251 "config create "
211252 f"{ rclone_config_name } "
0 commit comments