Skip to content

Commit

Permalink
rm some unused changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-seaice committed Feb 17, 2025
1 parent b7adc42 commit 4014ecf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
5 changes: 0 additions & 5 deletions payu/models/cesm_cmeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,6 @@ def get_components(self):
"Access-OM3 comprises a data runoff model, but the runoff model in nuopc.runconfig is set "
f"to {self.components['rof']}."
)

def archive(self):


super().archive()


class Runconfig:
Expand Down
29 changes: 13 additions & 16 deletions test/test_git_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,11 @@ def setup_and_teardown():
print(e)


def create_new_repo(repo_path, set_user=False):
"""Helper function to initialise a repo and create first commit
Set the git username if required"""
def create_new_repo(repo_path):
"""Helper function to initialise a repo and create first commit"""
repo = git.Repo.init(repo_path)
init_file = repo_path / "init.txt"
add_file_and_commit(repo, init_file)

if set_user :
try:
# Set config that is local to temporary test repository only
subprocess.run('git config user.name "TestUserName"',
check=True,
shell=True,
cwd=repo_path)
print("User name set successfully.")
except subprocess.CalledProcessError as e:
print(f"Error setting user name: {e}")
return repo


Expand Down Expand Up @@ -85,8 +73,17 @@ def test_get_git_user_info_no_config_set():

def test_get_git_user_info_config_set():
repo_path = tmpdir / "test_repo"
create_new_repo(repo_path, set_user = True)

create_new_repo(repo_path)
try:
# Set config that is local to temporary test repository only
subprocess.run('git config user.name "TestUserName"',
check=True,
shell=True,
cwd=repo_path)
print("User name set successfully.")
except subprocess.CalledProcessError as e:
print(f"Error setting user name: {e}")

repo = GitRepository(repo_path)
value = repo.get_user_info('name')

Expand Down

0 comments on commit 4014ecf

Please sign in to comment.