Skip to content
Snippets Groups Projects
Commit a2eddec8 authored by AxelCarayon's avatar AxelCarayon
Browse files

ajout verbose + renommage pour + de lisibilité

parent 338df9b8
No related branches found
No related tags found
No related merge requests found
......@@ -16,4 +16,7 @@ if (__name__ == "__main__"):
if not (args.branch):
print("Please specify a branch")
exit(1)
loadExperiment.run(args.load, args.branch)
\ No newline at end of file
loadExperiment.run(args.load, args.branch)
if (not args.save) and (not args.load):
print("Please specify an action")
exit(1)
\ No newline at end of file
......@@ -113,14 +113,17 @@ def branchExists(branchName) -> bool:
return branchName in repository.references
def pushBranch(version=1) -> None:
print("Pushing branch...")
while (branchExists(f"{experimentName}Experiment{version}")):
version += 1
else:
print(f"creating {experimentName}Experiment{version} branch and pushing changes to it ...")
repository.git.checkout('-b', f"{experimentName}Experiment{version}")
repository.git.add(all=True)
repository.git.commit(m=f"{experimentName}Experiment{version}")
repository.git.push('--set-upstream', repository.remote().name, f"{experimentName}Experiment{version}")
repository.git.checkout(experimentName)
print("done")
def genChecksum(file) -> str :
hash_md5 = hashlib.md5()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment