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

Permet à l'utilisateur de choisir un fichier d'inputs (ou aucun)

parent cf135281
No related branches found
No related tags found
1 merge request!16Permet à l'utilisateur de choisir un fichier d'inputs (ou aucun)
...@@ -71,12 +71,16 @@ def folderExists(folderName) -> bool: ...@@ -71,12 +71,16 @@ def folderExists(folderName) -> bool:
def searchForInputFolder() -> None: def searchForInputFolder() -> None:
global inputFolder global inputFolder
print("Searching for input folder...") answer = input("If you use input data, where are they stored ? Give the path from the root of the repository : ")
if folderExists("inputs"): if answer == "":
inputFolder = "inputs/" warnings.warn("No input folder given, no input files will be registered")
print(f"{path}{inputFolder} found !")
else: else:
raise Exception(f"{path}/inputs folder does not exist") if not folderExists("inputs"):
raise Exception(f"{path}/{answer} folder does not exist")
else:
if not answer.endswith("/"):
answer+="/"
inputFolder = answer
def searchForOutputFolder() -> None: def searchForOutputFolder() -> None:
global outputFolder global outputFolder
...@@ -207,9 +211,10 @@ def run(folder) -> None : ...@@ -207,9 +211,10 @@ def run(folder) -> None :
runExperiment() runExperiment()
else: else:
captureExperiment() captureExperiment()
scanInputFiles() if inputFolder != None :
scanInputFiles()
if outputFolder != None : if outputFolder != None :
scanOutputsGenerated() scanOutputsGenerated()
checkGeneratedFiles() checkGeneratedFiles()
writeInYaml() writeInYaml()
#pushBranch() pushBranch()
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment