Skip to content

Commit

Permalink
chore: remove log statements that have no value or can cause crashes/…
Browse files Browse the repository at this point in the history
…noisy logs
  • Loading branch information
aaronm-2112 committed Oct 7, 2024
1 parent e8f8bc9 commit c3d3e0c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/pyflask/curate/curate.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,10 +907,7 @@ def recursive_dataset_scan(
list_copy_files, list_move_files = recursive_dataset_scan(
folder, folderpath, list_copy_files, list_move_files
)
for file in list_copy_files:
namespace_logger.info(f"file to copy: {file}")
for file in list_move_files:
namespace_logger.info(f"file to move: {file}")

# 3. Add high-level metadata files in the list
if "metadata-files" in soda_json_structure.keys():
namespace_logger.info("generate_dataset_locally (optional) step 3 handling metadata-files")
Expand Down
9 changes: 5 additions & 4 deletions src/pyflask/datasets/compare_local_remote_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

def import_subfolders(subfolder, path):
global PENNSIEVE_URL
global namespace_logger
global pennsieve_dataset_paths
folder_id = subfolder["id"]
try:
Expand All @@ -38,7 +39,7 @@ def import_subfolders(subfolder, path):
for folder_name, folder in subfolder["folders"].items():
import_subfolders(folder, f"{path}/{folder_name}")
except Exception as e:
print(f"Exception when calling API: {e}")
namespace_logger.info(f"Exception when calling API: {e}")
raise e


Expand Down Expand Up @@ -72,7 +73,7 @@ def import_pennsieve_dataset(dataset_id, path):
for folder_name, folder in pennsieve_dataset_structure["folders"].items():
import_subfolders(folder, f"{folder_name}")
except Exception as e:
print(f"Exception when calling API: {e}")
namespace_logger.info(f"Exception when calling API: {e}")
raise e


Expand Down Expand Up @@ -100,7 +101,7 @@ def import_local_dataset(path):
for folder_name, folder in local_dataset_structure["folders"].items():
import_local_subfolders(folder, f"{path}/{folder_name}")
except Exception as e:
print(f"Exception when calling API: {e}")
namespace_logger.info(f"Exception when calling API: {e}")
raise e


Expand All @@ -125,7 +126,7 @@ def import_local_subfolders(subfolder, path):
for folder_name, folder in subfolder["folders"].items():
import_local_subfolders(folder, f"{path}/{folder_name}")
except Exception as e:
print(f"Exception when calling API: {e}")
namespace_logger.info(f"Exception when calling API: {e}")
raise e


Expand Down
1 change: 0 additions & 1 deletion src/pyflask/datasets/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ def reserve_dataset_doi(dataset): # sourcery skip: extract-method
doi_request.raise_for_status()
return {"doi": doi_request.json()["doi"]}
except Exception as e:
print(e)
abort(e.response.status_code, e.response.json().get('message'))


Expand Down

0 comments on commit c3d3e0c

Please sign in to comment.