evolving_ideas.domain.services.idea_tree

evolving_ideas.domain.services.ide_tree.py

Classes

IdeaTree

Represents a tree structure for an idea, including its versions and metadata.

Module Contents

class evolving_ideas.domain.services.idea_tree.IdeaTree(idea_dir: pathlib.Path)

Represents a tree structure for an idea, including its versions and metadata. This class provides methods to manage the idea’s versions and metadata.

idea_dir
meta_path
metadata
versions
add_version(version: evolving_ideas.domain.models.idea.IdeaVersion)

Adds a new version to the idea tree.

Parameters:

version (IdeaVersion) – The IdeaVersion object to add.

show_tree()

Displays the idea tree structure in a human-readable format. This method prints the idea’s metadata and its version tree.

add_new_version(new_version: evolving_ideas.domain.models.idea.IdeaVersion)

Adds a new version to the idea tree, ensuring it does not conflict with existing versions.

Parameters:

new_version (IdeaVersion) – The IdeaVersion object to add.

Raises:

ValueError – If the version already exists in the tree.