chore: 🧹 Ruff clean up
This commit is contained in:
@@ -100,7 +100,9 @@ if __name__ == "__main__":
|
|||||||
logging.info("Aborting...")
|
logging.info("Aborting...")
|
||||||
exit(0)
|
exit(0)
|
||||||
else:
|
else:
|
||||||
shutil.rmtree(Path(Config.COMBINED_FOLDER)) # Delete everything including the directory
|
shutil.rmtree(
|
||||||
|
Path(Config.COMBINED_FOLDER)
|
||||||
|
) # Delete everything including the directory
|
||||||
Path(Config.COMBINED_FOLDER).mkdir()
|
Path(Config.COMBINED_FOLDER).mkdir()
|
||||||
|
|
||||||
extraction = Extract(Config)
|
extraction = Extract(Config)
|
||||||
@@ -168,7 +170,7 @@ if __name__ == "__main__":
|
|||||||
files_processed_so_far = (
|
files_processed_so_far = (
|
||||||
files_processed_previous + completed_count
|
files_processed_previous + completed_count
|
||||||
)
|
)
|
||||||
|
|
||||||
elapsed_time = time.time() - start
|
elapsed_time = time.time() - start
|
||||||
rate_per_second = files_processed_so_far / elapsed_time
|
rate_per_second = files_processed_so_far / elapsed_time
|
||||||
|
|
||||||
@@ -215,6 +217,8 @@ if __name__ == "__main__":
|
|||||||
elif elapsed_time < 3600:
|
elif elapsed_time < 3600:
|
||||||
elapsed_time_str = f"{int(elapsed_time // 60)}m {int(elapsed_time % 60)}s"
|
elapsed_time_str = f"{int(elapsed_time // 60)}m {int(elapsed_time % 60)}s"
|
||||||
else:
|
else:
|
||||||
elapsed_time_str = f"{int(elapsed_time // 3600)}h {int((elapsed_time % 3600) // 60)}m"
|
elapsed_time_str = (
|
||||||
|
f"{int(elapsed_time // 3600)}h {int((elapsed_time % 3600) // 60)}m"
|
||||||
|
)
|
||||||
|
|
||||||
logging.info(f"All Complete total time {elapsed_time_str}")
|
logging.info(f"All Complete total time {elapsed_time_str}")
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class GenerateTimeseries:
|
|||||||
ypp = nrows_basin * cellres_basin
|
ypp = nrows_basin * cellres_basin
|
||||||
|
|
||||||
start_col = np.floor(xp / cellres_radar) - 1
|
start_col = np.floor(xp / cellres_radar) - 1
|
||||||
end_col = np.ceil((xpp + xp) / cellres_radar) -1
|
end_col = np.ceil((xpp + xp) / cellres_radar) - 1
|
||||||
|
|
||||||
start_row = np.floor(nrows_radar - ((yp + ypp) / cellres_radar)) + 1
|
start_row = np.floor(nrows_radar - ((yp + ypp) / cellres_radar)) + 1
|
||||||
end_row = np.ceil(nrows_radar - (yp / cellres_radar)) + 1
|
end_row = np.ceil(nrows_radar - (yp / cellres_radar)) + 1
|
||||||
|
|||||||
Reference in New Issue
Block a user