use argparser for project selection

This commit is contained in:
2025-12-17 20:12:32 +01:00
parent b7f9bf66b0
commit c06fc7f485
+10 -2
View File
@@ -1,6 +1,7 @@
import os.path import os.path
import numpy as np import numpy as np
import cv2 as cv import cv2 as cv
from argparse import ArgumentParser
from stack_factory import StackFactory from stack_factory import StackFactory
from status import Status from status import Status
from stack_deep import StackDeep from stack_deep import StackDeep
@@ -90,8 +91,15 @@ def main(prj_name: str = "test"):
stack.state_save() stack.state_save()
if __name__ == "__main__": if __name__ == "__main__":
# main("norb_small_16h_v2") ap = ArgumentParser()
main("mnist_2") ap.add_argument("name", type=str,
default='default',
help="Name of project")
args = ap.parse_args()
var_args = vars(args)
main(var_args["name"])
cv.destroyAllWindows() cv.destroyAllWindows()
print("Test: [passed]") print("Test: [passed]")