yieldplotlib.core#
Core module of yieldplotlib.
Submodules#
Classes#
Represents a directory containing multiple nodes (files or subdirectories). |
|
Represents a CSV file and its associated data. |
|
A generic node for handling files. |
|
Node for handling JSON files and their associated data. |
|
Node for handling generic pickle files and their associated data. |
|
Abstract base class for all nodes (files and directories). |
Package Contents#
- class yieldplotlib.core.DirectoryNode(directory_path)[source]#
Bases:
yieldplotlib.core.node.NodeRepresents a directory containing multiple nodes (files or subdirectories).
- Parameters:
directory_path (pathlib.Path)
- directory_path#
- directory_name#
- _children = []#
- add(node)[source]#
Add a child node to the directory.
- Parameters:
node (yieldplotlib.core.node.Node)
- get(key, **kwargs)[source]#
Recursively search for data associated with the given key.
- Parameters:
key (str)
- display_tree(level=0, max_children=5, prefix='')[source]#
Recursively display the tree structure.
- Args:
- level (int):
The current level of the tree.
- max_children (int):
The maximum number of children to display.
- prefix (str):
The prefix to display at the current level.
- _create_directory_node(path)[source]#
Create a directory node for the given path.
- Parameters:
path (pathlib.Path)
- Return type:
- _create_file_node(path)[source]#
Create a file node for the given path.
- Parameters:
path (pathlib.Path)
- Return type:
- class yieldplotlib.core.CSVFile(file_path)[source]#
Bases:
FileNodeRepresents a CSV file and its associated data.
- Parameters:
file_path (pathlib.Path)
- class yieldplotlib.core.FileNode(file_path)[source]#
Bases:
yieldplotlib.core.node.NodeA generic node for handling files.
- Parameters:
file_path (pathlib.Path)
- get(key, **kwargs)[source]#
Translate the key and delegate to the subclass-specific _get method.
- Parameters:
key (str)
- class yieldplotlib.core.JSONFile(file_path)[source]#
Bases:
FileNodeNode for handling JSON files and their associated data.
- Parameters:
file_path (pathlib.Path)
- class yieldplotlib.core.PickleFile(file_path)[source]#
Bases:
FileNodeNode for handling generic pickle files and their associated data.
- Parameters:
file_path (pathlib.Path)
- class yieldplotlib.core.Node(file_path)[source]#
Bases:
abc.ABCAbstract base class for all nodes (files and directories).
- Parameters:
file_path (pathlib.Path)
- data = None#
- file_path#
- file_name#
- is_input = False#
- abstractmethod get(key, **kwargs)[source]#
Abstract method to search for data associated with a key.
- Parameters:
key (str)