@@ -173,23 +173,19 @@ def get_funding_details():
173173 award_number = get_user_input ("Enter the award number for funding: " )
174174 award_exists = check_award_number (award_number )
175175 if not award_exists :
176- print (
177- f"""Error: No award with number '{ award_number } ' found in
176+ print (f"""Error: No award with number '{ award_number } ' found in
178177 CaltechDATA. You will need to provide more details about the
179- funding."""
180- )
178+ funding.""" )
181179 award_title = get_user_input ("Enter the award title for funding: " )
182180 while True :
183181 funder_identifier = get_user_input ("Enter the funder ROR (https://ror.org): " )
184182 name = validate_funder_identifier (funder_identifier )
185183 if name :
186184 break
187185 else :
188- print (
189- """This funder identifier is not a ROR. Please enter a valid
186+ print ("""This funder identifier is not a ROR. Please enter a valid
190187 ROR identifier (without the url). For example the ROR for the
191- NSF is 021nxhr62."""
192- )
188+ NSF is 021nxhr62.""" )
193189 print ("-" * 10 )
194190 return {
195191 "awardNumber" : award_number ,
@@ -349,14 +345,12 @@ def write_s3cmd_config(endpoint):
349345 access_key = get_user_input ("Enter the access key: " )
350346 secret_key = get_user_input ("Enter the secret key: " )
351347 with open (configf , "w" ) as file :
352- file .write (
353- f"""[default]
348+ file .write (f"""[default]
354349 access_key = { access_key }
355350 host_base = { endpoint }
356351 host_bucket = %(bucket).{ endpoint }
357352 secret_key = { secret_key }
358- """
359- )
353+ """ )
360354
361355
362356def upload_supporting_file (record_id = None ):
@@ -431,11 +425,9 @@ def upload_supporting_file(record_id=None):
431425 elif filename in files :
432426 file_size = os .path .getsize (filename )
433427 if file_size > 1024 * 1024 * 1024 :
434- print (
435- """The file is greater than 1 GB. Please upload the
428+ print ("""The file is greater than 1 GB. Please upload the
436429 metadata to CaltechDATA, and you'll be provided
437- instructions to upload the files to S3 directly."""
438- )
430+ instructions to upload the files to S3 directly.""" )
439431 else :
440432 filepath = os .path .abspath (filename )
441433 filepaths .append (filepath )
@@ -643,12 +635,10 @@ def print_upload_message(rec_id, production):
643635 if production
644636 else "https://data.caltechlibrary.dev/uploads/"
645637 )
646- print (
647- f"""You can view and publish this record at
638+ print (f"""You can view and publish this record at
648639 { base_url } { rec_id }
649640 If you need to upload large files to S3, you can type
650- `s3cmd put DATA_FILE s3://ini230004-bucket01/{ rec_id } /`"""
651- )
641+ `s3cmd put DATA_FILE s3://ini230004-bucket01/{ rec_id } /`""" )
652642
653643
654644def edit_record (production ):
0 commit comments