Merge branch 'main' of github.com:Pythagora-io/copilot

This commit is contained in:
Zvonimir Sabljic
2023-08-09 16:54:41 +02:00
2 changed files with 5 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ class ProductOwner(Agent):
step = get_progress_steps(self.project.args['app_id'], self.project.current_step)
if step and not execute_step(self.project.args['step'], self.project.current_step):
step_already_finished(self.project.args, step)
self.project.root_path = setup_workspace(self.project.args['name'])
self.project.project_description = step['summary']
self.project.project_description_messages = step['messages']
return
@@ -32,7 +33,7 @@ class ProductOwner(Agent):
self.project.args['app_type'] = ask_for_app_type()
self.project.args['name'] = clean_filename(ask_user(self.project, 'What is the project name?'))
setup_workspace(self.project.root_path, self.project.args['name'])
self.project.root_path = setup_workspace(self.project.args['name'])
self.project.app = save_app(self.project.args)

View File

@@ -11,11 +11,12 @@ def get_parent_folder(folder_name):
return current_path.parent
def setup_workspace(root, project_name):
def setup_workspace(project_name):
root = get_parent_folder('euclid')
create_directory(root, 'workspace')
project_path = create_directory(os.path.join(root, 'workspace'), project_name)
create_directory(project_path, 'tests')
return
return project_path
def create_directory(parent_directory, new_directory):