diff --git a/DirectReport/commandline/commandline.py b/DirectReport/commandline/commandline.py index 1f2f4ac1..193a93e3 100644 --- a/DirectReport/commandline/commandline.py +++ b/DirectReport/commandline/commandline.py @@ -9,7 +9,6 @@ from DirectReport.models.weekly_builder import WeeklyBuilder from DirectReport.models.daily_builder import DailyBuilder from DirectReport.models.note.note_builder import NoteBuilder -from DirectReport.models.blocker_models.block_builder import BlockerBuilder file = Path(__file__).resolve() package_root_directory = file.parents[1] diff --git a/DirectReport/models/blocker_models/__init__.py b/DirectReport/models/blocker_models/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/DirectReport/models/blocker_models/block_builder.py b/DirectReport/models/blocker_models/block_builder.py deleted file mode 100644 index d7533772..00000000 --- a/DirectReport/models/blocker_models/block_builder.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python3 - - -from DirectReport.database.blocker_storage import BlockerDataStore - - -class BlockerBuilder: - def __init__(self): - """ - Initializes a new instance of the BlockerBuilder class. - """ - pass - - @staticmethod - def add_new_blocker(blocker_text, associated_id): - """ - Adds a new blocker entry. - - :param blocker_text: The blocker text to add. - :param associated_id: The ID associated with the blocker entry. - :return: None - """ - blocker = BlockerDataStore('SQLite_Python.db') - blocker.create_table() - blocker.add_blocker_entry(blocker_text, str(associated_id)) - - @staticmethod - def get_blockers(associated_id): - """ - Retrieves a list of blockers associated with the specified ID. - - :param associated_id: The ID to retrieve blockers for. - :return: A list of blockers associated with the ID. - """ - blockers = BlockerDataStore('SQLite_Python.db') - blocker_list = blockers.entries_for_associated_uuid(associated_id) - return blocker_list diff --git a/DirectReport/models/blocker_models/blocker.py b/DirectReport/models/blocker_models/blocker.py deleted file mode 100644 index 1c9f61c9..00000000 --- a/DirectReport/models/blocker_models/blocker.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python3 - - -class Blocker: - def __init__(self, uuid, associated_entry_uuid, blocker_text): - """ - Initializes a new instance of the Blocker class. - - :param uuid: The UUID of the blocker. - :param associated_entry_uuid: The UUID of the associated entry. - :param blocker_text: The blocker text. - """ - self.uuid = uuid - self.associated_entry_uuid = associated_entry_uuid - self.blocker_text = blocker_text - - def to_dict(self): - """ - Convert the Blocker object to a dictionary. - - :return: The Blocker object as a dictionary. - :rtype: dict - """ - return { - "uuid": str(self.uuid), - "associated_entry_uuid": str(self.associated_entry_uuid), - "blocker_models": self.blocker_text, - } - - def __iter__(self): - return self - - def __str__(self): - return "{ " + "".join((' {} : {} '.format(item, self.__dict__[item]) for item in self.__dict__)) + " }" - - def __repr__(self): - return self.__str__() - - def __len__(self): - return len(self.blocker_text) diff --git a/DirectReport/models/entry.py b/DirectReport/models/entry.py index 105d2b1c..2cae2f93 100644 --- a/DirectReport/models/entry.py +++ b/DirectReport/models/entry.py @@ -2,7 +2,6 @@ import datetime from DirectReport.models.note.note_builder import NoteBuilder -from DirectReport.models.blocker_models.block_builder import BlockerBuilder class Entry: @@ -35,7 +34,6 @@ def __init__(self, uuid, topic, message, created_at, modified_on, week_uuid): self.modified_on = modified_on self.week_uuid = week_uuid self.notes = NoteBuilder.get_notes(self.uuid) - self.blockers = BlockerBuilder.get_blockers(self.uuid) def get_created_at_formatted(self, date_format="%Y-%m-%d %H:%M:%S"): """ @@ -71,7 +69,6 @@ def to_dict(self): "modified_on": str(self.modified_on), "week_uuid": str(self.week_uuid), "notes": self.notes, - "blockers": self.blockers, } @classmethod