@@ -93,6 +93,9 @@ def get_project_detail(
9393
9494 if "_" in attr :
9595 attr = attr .lower ()
96+
97+ if attr == "slug_name" :
98+ default = slugify (str (project_detail ["name" ]))
9699
97100 # Tuples Attrs means the detail have options, so process them differently
98101 if not isinstance (default , tuple ):
@@ -213,8 +216,8 @@ def generate_project_scaffold(project_detail: dict[str, str]):
213216
214217 # create and activate virtual environment
215218 subprocess .Popen (["python3" , "-m" , "venv" , "venv" ]).wait ()
216- subprocess .Popen (["bash" , "-c" , "source" , " venv/bin/activate" ]).wait ()
217- subprocess .Popen (["pip" , "install" , "-r" , "requirements.txt" ]).wait ()
219+ subprocess .Popen (["bash" , "-c" , "source venv/bin/activate && pip install -r requirements.txt " ]).wait ()
220+ # subprocess.Popen(["pip", "install", "-r", "requirements.txt"]).wait()
218221
219222
220223 print ("____________________________________________" )
@@ -244,7 +247,6 @@ def main():
244247
245248 start_time = time .time () # this is an internal metric to track the duration for each project generation
246249 for attr , default_value in project_details .items ():
247- print (f"Attr: { attr } , Default = { default_value } " )
248250 detail = get_project_detail (attr .title (), default_value , project_details )
249251 project_details [attr ] = detail # update the default project detail with the provided one
250252 success_print (f"Project { attr .title ()} = { detail } " )
@@ -256,11 +258,9 @@ def main():
256258 print ("----------------------------------------------" )
257259
258260 # Generate Projects with the Details Provided by the User
259- # generate_project_scaffold(cast(dict[str, str], project_details))
260-
261- from icecream import ic
262- ic (project_details )
261+ generate_project_scaffold (cast (dict [str , str ], project_details ))
263262
264263
264+
265265if __name__ == "__main__" :
266266 main ()
0 commit comments