diff --git a/src/metadata_review_lib.py b/src/metadata_review_lib.py index 33adc6d..6a5d59f 100644 --- a/src/metadata_review_lib.py +++ b/src/metadata_review_lib.py @@ -78,15 +78,15 @@ def first_initialize_metadata_review(hdf5_file_path, reviewer_attrs): raise ValueError("metadata review cannot be initialized. The associated .yaml file under review was not found. Run take_yml_snapshot_of_hdf5_file(filename_path) ") # Initialize metadata review workflow - print("Create branch metadata-review-by-"+initials+"\n") + # print("Create branch metadata-review-by-"+initials+"\n") - checkout_review_branch(branch_name) + #checkout_review_branch(branch_name) current_branch_command = ['git','branch','--show-current'] curr_branch = subprocess.run(current_branch_command,capture_output=True,text=True,check=True) if not branch_name in curr_branch.stdout: - print('Fail to checkout branch. ') + raise ValueError("Please checkout the branch: "+branch_name+" via Git Bash Terminal while in the project's directory") # Check if review file already exists and then check if it is still untracked review_yaml_file_path = os.path.join("review/",filename+YAML_EXT) @@ -154,7 +154,7 @@ def second_submit_metadata_review(review_yaml_file_path, reviewer_attrs): curr_branch = subprocess.run(current_branch_command,capture_output=True,text=True,check=True) if not branch_name in curr_branch.stdout: - raise ValueError('Make sure you run initial workflow step. If you are running the workflow using the jupyter notebook. Excecute Cell associated with Step 1.') + raise ValueError('Make sure you are located at branch' + branch_name + '. Try to Excecute Cell with Step 1 first. ') #if any([status in get_review_status(filename_path) for status in ['under review','submitted']]):