Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
“RobHanna-NOAA” authored and “RobHanna-NOAA” committed Jan 24, 2025
1 parent b945c04 commit 90ec96a
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions data/get_sample_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def __copy_folder(input_path: str, output_path: str, input_root: str = None, buc
if input_root[-1] != '/':
input_root = input_root + '/'

# Strip bucket path if use_s3 is True
# Strip bucket path if use_s3 is True
if use_s3:
input_dir = input_path.removeprefix(bucket_path)[1:]

Expand Down Expand Up @@ -280,13 +280,15 @@ def download_s3_folder(bucket_name: str, s3_folder: str, local_dir: str = None):
os.path.join(os.path.split(NWM_RECUR_FILE)[0], f'nwm3_17C_recurr_{recurr_interval}_0_cms.csv'),
output_root_folder,
input_root,
bucket_path
bucket_path,
)

__copy_file(os.environ["vmann_input_file"], output_root_folder, input_root, bucket_path)

## usgs_gages
__copy_file(os.path.join(input_path, 'usgs_gages', 'usgs_gages.gpkg'), output_root_folder, input_root, bucket_path)
__copy_file(
os.path.join(input_path, 'usgs_gages', 'usgs_gages.gpkg'), output_root_folder, input_root, bucket_path
)

__copy_file(os.environ["usgs_rating_curve_csv"], output_root_folder, input_root, bucket_path)

Expand Down Expand Up @@ -349,32 +351,39 @@ def download_s3_folder(bucket_name: str, s3_folder: str, local_dir: str = None):
command.extend(dem_list)
subprocess.call(command)

__copy_file(os.path.join(INPUT_CALIB_POINTS_DIR, f'{huc}.parquet'), output_root_folder, input_root, bucket_path)
__copy_file(
os.path.join(INPUT_CALIB_POINTS_DIR, f'{huc}.parquet'),
output_root_folder,
input_root,
bucket_path,
)

## ras2fim
ras2fim_input_dir = os.path.join(os.environ["ras2fim_input_dir"], huc)
__copy_file(
os.path.join(ras2fim_input_dir, os.environ["ras_rating_curve_csv_filename"]),
output_root_folder,
input_root,
bucket_path
bucket_path,
)
__copy_file(
os.path.join(ras2fim_input_dir, os.environ["ras_rating_curve_gpkg_filename"]),
output_root_folder,
input_root,
bucket_path
bucket_path,
)

__copy_file(
os.path.join(os.environ["ras2fim_input_dir"], huc, os.environ["ras_rating_curve_gpkg_filename"]),
output_root_folder,
input_root,
bucket_path
bucket_path,
)

## pre_clip_huc8
__copy_folder(os.path.join(os.environ["pre_clip_huc_dir"], huc), output_root_folder, input_root, bucket_path)
__copy_folder(
os.path.join(os.environ["pre_clip_huc_dir"], huc), output_root_folder, input_root, bucket_path
)

## validation data
for org in orgs:
Expand Down

0 comments on commit 90ec96a

Please sign in to comment.