Added ignored folders to the function for building a directory tree + added get_files function + changed the way Agents are imported

This commit is contained in:
Zvonimir Sabljic
2023-08-02 10:45:22 +02:00
parent de9b01bc72
commit 70617bf80b
3 changed files with 35 additions and 8 deletions

View File

@@ -13,5 +13,17 @@ STEPS = [
'architecture',
'development_planning',
'environment_setup',
'development'
'coding'
]
IGNORE_FOLDERS = [
'.git',
'.idea',
'.vscode',
'__pycache__',
'node_modules',
'package-lock.json',
'venv',
'dist',
'build',
]

View File

@@ -1,4 +1,11 @@
from helpers.agents import Developer, DevOps, TechLead, Architect, ProductOwner
from const.common import IGNORE_FOLDERS
from helpers.cli import build_directory_tree
from helpers.agents.CodeMonkey import CodeMonkey
from helpers.agents.TechLead import TechLead
from helpers.agents.DevOps import DevOps
from helpers.agents.Developer import Developer
from helpers.agents.Architect import Architect
from helpers.agents.ProductOwner import ProductOwner
class Project:
def __init__(self, args, name=None, description=None, user_stories=None, user_tasks=None, architecture=None, development_plan=None, current_step=None):
@@ -34,4 +41,16 @@ class Project:
self.developer = Developer(self)
self.developer.set_up_environment();
self.developer.start_coding()
self.developer.start_coding()
def get_directory_tree(self):
return build_directory_tree(self.root_path, ignore=IGNORE_FOLDERS)
def get_files(self, files):
files_with_content = []
for file in files:
files_with_content.append({
"path": file,
"content": open(file, 'r').read()
})
return files_with_content

View File

@@ -1,5 +1 @@
from .ProductOwner import ProductOwner
from .Developer import Developer
from .DevOps import DevOps
from .TechLead import TechLead
from .Architect import Architect