Removed unecessary pygit depenedency and associated function that relied on it.
This commit is contained in:
@ -6,22 +6,17 @@ import subprocess
|
|||||||
|
|
||||||
import h5py
|
import h5py
|
||||||
import yaml
|
import yaml
|
||||||
import shutil
|
|
||||||
import src.g5505_utils as utils
|
import src.g5505_utils as utils
|
||||||
import src.hdf5_vis as hdf5_vis
|
import src.hdf5_vis as hdf5_vis
|
||||||
#import input_files.config_file as config_file
|
#import input_files.config_file as config_file
|
||||||
import src.hidden as hidden
|
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
import pygit2 as pygit
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
YAML_EXT = ".yaml"
|
YAML_EXT = ".yaml"
|
||||||
TXT_EXT = ".txt"
|
TXT_EXT = ".txt"
|
||||||
|
|
||||||
repo_obj = pygit.Repository(os.path.abspath(os.curdir))
|
|
||||||
|
|
||||||
|
|
||||||
def get_review_status(filename_path):
|
def get_review_status(filename_path):
|
||||||
@ -35,22 +30,6 @@ def get_review_status(filename_path):
|
|||||||
workflow_steps.append(line)
|
workflow_steps.append(line)
|
||||||
return workflow_steps[-1]
|
return workflow_steps[-1]
|
||||||
|
|
||||||
def checkout_review_branch(branch_name):
|
|
||||||
# Create a new branch
|
|
||||||
#branch_name = 'metadata-review-by-'+initials
|
|
||||||
head_commit = repo_obj.head.peel()# Get the commit hash associated with HEAD
|
|
||||||
|
|
||||||
checkout_branch_command = lambda branch_name : ['git','checkout', branch_name]
|
|
||||||
output = subprocess.run(checkout_branch_command(branch_name), capture_output=True,text=True,check=True)
|
|
||||||
|
|
||||||
print(output.stdout)
|
|
||||||
|
|
||||||
#if not branch_name in repo_obj.branches:
|
|
||||||
# branch = repo_obj.create_branch(branch_name, head_commit)
|
|
||||||
#else:
|
|
||||||
# branch = repo_obj.branches[branch_name]
|
|
||||||
#repo_obj.checkout(branch)
|
|
||||||
|
|
||||||
current_branch_command = ['git','branch','--show-current']
|
current_branch_command = ['git','branch','--show-current']
|
||||||
status_command = ['git','status']
|
status_command = ['git','status']
|
||||||
add_command = lambda add_list: ['git','add'] + add_list
|
add_command = lambda add_list: ['git','add'] + add_list
|
||||||
|
Reference in New Issue
Block a user