evolving_ideas.domain.models.idea ================================= .. py:module:: evolving_ideas.domain.models.idea .. autoapi-nested-parse:: evolving_ideas.domain.models.idea Classes ------- .. autoapisummary:: evolving_ideas.domain.models.idea.Attachment evolving_ideas.domain.models.idea.QAPair evolving_ideas.domain.models.idea.IdeaVersion evolving_ideas.domain.models.idea.Tree evolving_ideas.domain.models.idea.NodeData evolving_ideas.domain.models.idea.IdeaMetadata Module Contents --------------- .. py:class:: Attachment Represents an attachment for an idea version. :cvar path: str: The file path of the attachment. :cvar description: str: A brief description of the attachment. .. py:attribute:: path :type: str .. py:attribute:: description :type: str .. py:class:: QAPair Represents a question and answer pair for an idea version. :cvar question: str: The question asked about the idea. :cvar answer: str: The answer provided for the question. .. py:attribute:: question :type: str .. py:attribute:: answer :type: str .. py:class:: IdeaVersion Represents a version of an idea. :cvar id: str: Unique identifier for the idea. :cvar version: int: The version number of the idea. :cvar title: str: The title of the idea. :cvar status: str: The current status of the idea (e.g., "raw", "in progress", "completed"). :cvar created_at: str: The timestamp when the idea version was created. :cvar author: str: The author of the idea version. :cvar parent_id: Optional[int]: The ID of the parent version, if applicable. :cvar description: str: A detailed description of the idea. :cvar context: dict: Additional context for the idea, such as role and task. :cvar qna: List[QAPair]: A list of question and answer pairs related to the idea. :cvar attachments: List[Attachment]: A list of attachments related to the idea. :cvar tags: List[str]: Tags associated with the idea for categorization. :cvar linked_projects: List[str]: Projects that this idea is linked to. :cvar related_ideas: List[str]: Other ideas that are related to this one. .. py:attribute:: id :type: str .. py:attribute:: version :type: int .. py:attribute:: title :type: str .. py:attribute:: status :type: str .. py:attribute:: created_at :type: str .. py:attribute:: author :type: str .. py:attribute:: parent_id :type: Optional[str] .. py:attribute:: description :type: str .. py:attribute:: context :type: dict .. py:attribute:: qna :type: List[QAPair] .. py:attribute:: attachments :type: List[Attachment] .. py:attribute:: tags :type: List[str] .. py:attribute:: summary :type: str :value: '' .. py:attribute:: method :type: Optional[str] :value: None .. py:attribute:: method_metadata :type: Optional[dict] :value: None .. py:method:: from_file(path: pathlib.Path) -> IdeaVersion :classmethod: Load an IdeaVersion from a YAML file. :param path: The path to the YAML file. :type path: Path :return: An IdeaVersion object loaded from the file. :rtype: IdeaVersion .. py:method:: to_file(path: pathlib.Path) Save the IdeaVersion to a YAML file. :param path: The path where the YAML file will be saved. :type path: Path .. py:class:: Tree Represents the version tree of an idea. :cvar root: int: The ID of the root version. :cvar current: int: The ID of the current version. :cvar children: dict: A dictionary mapping version IDs to their child versions. .. py:attribute:: root :type: int .. py:attribute:: current :type: int .. py:attribute:: children :type: dict[str, List[int]] .. py:class:: NodeData Represents a node in the idea tree. :cvar created_at: str: The timestamp when the node was created. :cvar note: str: A note or description for the node. .. py:attribute:: created_at :type: str .. py:attribute:: note :type: str .. py:attribute:: tags :type: List[str] .. py:class:: IdeaMetadata Represents metadata for an idea. :cvar id: str: Unique identifier for the idea. :cvar title: str: The title of the idea. :cvar created_by: str: The author of the idea. :cvar created_at: str: The timestamp when the idea was created. :cvar tree: dict: Metadata about the idea's version tree. .. py:attribute:: id :type: str .. py:attribute:: title :type: str .. py:attribute:: created_by :type: str .. py:attribute:: created_at :type: str .. py:attribute:: tree :type: Tree .. py:attribute:: node_data :type: dict[str, NodeData] .. py:method:: to_dict() -> dict Convert the IdeaMetadata to a dictionary. :return: A dictionary representation of the IdeaMetadata. :rtype: dict