feat: minor config update with massive module management update to dynamically import based on arguments

This commit is contained in:
dqnid committed 2026-08-23 00:52:36 +02:00
1 parent dd21fd19c6
commit 85e0f16f7d
12 files changed
+271 -252

No files matched your search

+13 -12
View File
@@ -1,14 +1,15 @@
from sympy import diff, limit, oo, symbols
import unittest
import sys
from modules.essential_math.examples.statistics_example import (
normal_distribution_example,
normal_distribution_exercise,
t_distribution_example,
basic_statistic_concepts_example,
z_scores_example,
final_exercises
)
if __name__ == "__main__":
if sys.argv.__len__() < 2:
print("[ERROR] Module name must be specified as an argument:")
print(" $ python src/main.py <module_name>")
exit(-1)
if __name__=="__main__":
final_exercises()
module_name = sys.argv[1]
module_path = "modules."+module_name
if sys.argv.__len__() > 2:
for submodule_name in sys.argv[2:]:
module_path += "."+submodule_name
module_selected = __import__(module_path, fromlist=[""])
module_selected.run()