π ChangelogΒΆ
ChangelogΒΆ
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
UnreleasedΒΆ
0.15.7 - 2023-01-26ΒΆ
AddedΒΆ
Misc: Sphinx documentation to support mermaid markdown images, reflect CHANGELOG section, add more emojis.
ChangedΒΆ
Misc: Update SEO image.
Misc: Fix Sphinx documentation font size difference between web and mobile, include last updated date.
Misc: Upgrade package versions in pre-commit hook.
FixedΒΆ
Tree Exporter:
hprint_treeandhyield_treeto be compatible withBinaryNodewhere child nodes can be None type.
0.15.6 - 2023-01-20ΒΆ
AddedΒΆ
DAGNode: Able to access and delete node children via name with square bracket accessor with
__getitem__and__delitem__magic methods.DAGNode: Able to delete all children for a node.
DAGNode: Able to check if node contains child node with
__contains__magic method.DAGNode: Able to iterate the node to access children with
__iter__magic method.
ChangedΒΆ
Tree Search: Modify type hints to include DAGNode for
find_children,find_child, andfind_child_by_name.Misc: Neater handling of strings for tests.
Misc: Documentation enhancement to split README into multiple files.
Misc: New Sphinx documentation theme.
0.15.5 - 2023-01-17ΒΆ
ChangedΒΆ
Misc: Neater handling of strings for tests.
Misc: Better examples for merging trees and weighted trees in Sphinx documentation.
Misc: Fix links and introduce unreleased segment in CHANGELOG.
0.15.4 - 2024-01-11ΒΆ
ChangedΒΆ
Tree Exporter:
hprint_treeandhyield_treeto allow hiding names of intermediate node.
FixedΒΆ
Tree Constructor:
newick_to_treeto handle invalid closing and use of apostrophe.Tree Exporter:
tree_to_newickto handle special characters by wrapping them in apostrophe.
0.15.3 - 2024-01-08ΒΆ
AddedΒΆ
Tree Helper:
get_subtreemethod to retrieve subtree.
0.15.2 - 2024-01-08ΒΆ
AddedΒΆ
Tree Exporter:
hprint_treeandhyield_treeto print and retrieve results for tree in horizontal orientation.Node: Added
hshowmethod to print tree in horizontal orientation to console.
0.15.1 - 2024-01-05ΒΆ
AddedΒΆ
Tree Constructor:
newick_to_treeto convert Newick notation to tree.
ChangedΒΆ
Tree Exporter:
tree_to_newickto accept more parameters to parse length and attributes.
FixedΒΆ
Misc: Automated doctest setup to use os operations instead of string operations.
0.15.0 - 2024-01-02ΒΆ
AddedΒΆ
Tree Exporter: Export to Newick notation with
tree_to_newick.
ChangedΒΆ
Tree Helper: Pruning tree to support pruning of multiple paths (accepts list of string).
Tree Helper: Pruning tree to support pruning of an exact path (i.e., remove descendants) with
exactparameter, default is prune and keep descendants.
0.14.8 - 2023-12-25ΒΆ
ChangedΒΆ
Tree Modifier: Enhance documentation examples.
Workflow To Do App: Change import and export logic.
Misc: Organize assets folder based on whether it originated from README, docstrings, or sphinx documentation.
Misc: Rename functions in
plot.pyutils file for coverage report.
FixedΒΆ
Misc: Fixed doctests and automate doctest checks.
0.14.7 - 2023-12-22ΒΆ
ChangedΒΆ
Tree Helper:
get_tree_diffenhanced to compare tree attributes by taking inattr_listparameter, and indicates difference with(~).
FixedΒΆ
Tree Helper:
get_tree_diffcompare tree structure by considering all nodes (previously only consider leaf nodes).
0.14.6 - 2023-12-14ΒΆ
AddedΒΆ
Node: Able to access and delete node children via name with square bracket accessor with
__getitem__and__delitem__magic methods.BaseNode/Node/BinaryNode: Able to add one or more children with
appendandextendmethods.BaseNode/Node/BinaryNode: Able to check if node contains child node with
__contains__magic method.BaseNode/Node/BinaryNode: Able to iterate the node to access children with
__iter__magic method. Results in children setter to only accept list/tuple/set instead of iterable types.
ChangedΒΆ
Tree Exporter:
tree_to_dotaccepts callable to set node and edge attrs for custom node (backward-compatible).Tree Exporter:
tree_to_mermaidaccepts callable to set node shape attr, edge arrow attr and node attr for custom node (backward-compatible).Tree Exporter: Change delimiter for
tree_to_mermaidto prevent possible path confusion (backward-compatible).Misc: Code abstraction for assertion checks and constants.
Misc: Documentation for exporting tree/dag to dot.
0.14.5 - 2023-11-24ΒΆ
ChangedΒΆ
Misc: Update SECURITY file.
Misc: Documentation enhancement to add more emoji, and highlight code blocks.
0.14.4 - 2023-11-04ΒΆ
ChangedΒΆ
Misc: Clean up github actions.
0.14.3 - 2023-10-31ΒΆ
AddedΒΆ
Misc: Publish to conda, enable automated publishing to conda-forge in addition to existing PyPI.
Misc: Tree demonstration code for
shift_and_replace_nodesandcopy_and_replace_nodes_from_tree_to_treein README.
0.14.2 - 2023-10-21ΒΆ
AddedΒΆ
Misc: RTD integration.
Misc: Enable manual publishing of python package.
0.14.1 - 2023-10-18ΒΆ
AddedΒΆ
Misc: Changes to main branch checks if the latest version exists (using git tag) before publishing package and building documentation.
0.14.0 - 2023-10-18ΒΆ
AddedΒΆ
Tree Modifier: Shift nodes with replacement of to-node with
shift_and_replace_nodes.Tree Modifier: Copy nodes from tree to tree with replacement of to-node with
copy_and_replace_nodes_from_tree_to_tree.Tree Modifier: Any permutation of configuration with replacement of to-node with
replace_logic.Tree Modifier: Add relevant test cases and documentations accordingly.
0.13.3 - 2023-10-17ΒΆ
AddedΒΆ
Misc: Add automatic release notes with content into GitHub workflow.
0.13.2 - 2023-10-17ΒΆ
AddedΒΆ
Misc: Add automatic release notes into GitHub workflow.
0.13.1 - 2023-10-15ΒΆ
AddedΒΆ
Misc: Add automatic comment on code coverage to pull requests into GitHub workflow.
Misc: Add more checks into pre-commit.
0.13.0 - 2023-09-29ΒΆ
AddedΒΆ
Tree Exporter: Export tree to flowchart diagram in mermaid markdown format using
tree_to_mermaid.
ChangedΒΆ
Tree Exporter: Relax type hinting using TypeVar for
clone_tree.Tree Helper: Accept Iterable instead of List for custom_style attribute of
yield_treeandprint_tree.Misc: Fix docstring for better presentation of code vs variable vs normal text.
0.12.5 - 2023-09-26ΒΆ
AddedΒΆ
Utility Groot: Add test cases.
FixedΒΆ
Tree Exporter:
tree_to_pillowfunction to reference online font file instead of relative path.
0.12.4 - 2023-09-25ΒΆ
AddedΒΆ
Utility Groot: Add groot utility functions.
0.12.3 - 2023-09-17ΒΆ
ChangedΒΆ
Clearer documentation, fixed docstring phrasing and spelling.
Clearer error messages, standardized error messages.
0.12.2 - 2023-09-12ΒΆ
ChangedΒΆ
Tree Plot: Reingold Tilford Algorithm code for succinctness and docstring.
0.12.1 - 2023-09-11ΒΆ
FixedΒΆ
Tree Plot: Reingold Tilford Algorithm to handle cases of negative x-coordinates with adjustment parameter.
0.12.0 - 2023-09-09ΒΆ
ChangedΒΆ
Tree/DAG Constructor, Tree/DAG Exporter: Make
pandasoptional dependency.
FixedΒΆ
Misc: Fixed Calendar workflow to throw error when
to_dataframemethod is called on empty calendar.Tree/DAGNode Exporter, Tree Helper, Tree Search: Relax type hinting using TypeVar.
0.11.0 - 2023-09-08ΒΆ
AddedΒΆ
Tree Helper: Pruning tree to allow pruning by
prune_pathandmax_depth.Tree Plot: Implement Enhanced Reingold Tilford Algorithm to retrieve (x, y) coordinates for a tree structure.
ChangedΒΆ
BaseNode/DAGNode:
get_attrmethod to allow default return value.
FixedΒΆ
Utility Iterator: Relax type hinting using TypeVar.
0.10.3 - 2023-08-12ΒΆ
AddedΒΆ
Tree Constructor:
add_path_to_tree,dataframe_to_tree,dataframe_to_tree_by_relationto allow custom node types that takes in constructor arguments.
ChangedΒΆ
Binary Tree: Able to accept node val of
strtype besidesinttype.
0.10.2 - 2023-08-11ΒΆ
FixedΒΆ
Tree Constructor:
nested_dict_to_treeto throw TypeError if child_key is not list type.
0.10.1 - 2023-07-27ΒΆ
AddedΒΆ
[#71] Node:
path_nameto allow different node name of different dtypes; map everything to string type.
0.10.0 - 2023-07-15ΒΆ
AddedΒΆ
[#65] Tree Search: Implement
find_relative_pathto find relative path from node.[#65] Utility Iterator: Implement
zigzag_iterandzigzaggroup_iterTree traversal methods.
0.9.5 - 2023-07-13ΒΆ
AddedΒΆ
Misc: Added init files, add link to discussions to README and pyproject, add sphinx coverage shortcuts.
FixedΒΆ
[#66] DAGNode/Node: Children constructor to allow Iterable types, fixed issue of lists being mutable.
[#67] Node:
path_nameto reduce number of recursive calls to root node forsep.
0.9.4 - 2023-06-18ΒΆ
AddedΒΆ
Tree Constructor:
list_to_tree_by_relationanddataframe_to_tree_by_relationmethod to allow duplicate intermediate nodes (default is false).DAG Exporter: Added
node_shapeparameter indag_to_dotexport function for easier way to customize node shape.Misc: More test cases.
Misc: Added security instructions on how to raise vulnerabilities.
Misc: Added Calendar workflow to documentation.
ChangedΒΆ
Tree Constructor:
add_dict_to_tree_by_namemethod rename argument frompath_attrstoname_attrs.Misc: Modified contributing instructions.
FixedΒΆ
Tree Exporter:
tree_to_dotto handle cases when not all nodes haveedge_attr.DAG Exporter:
dag_to_dotto perform dictionary copy to prevent style from being overridden for child nodes.Tree Constructor:
dataframe_to_treeto handle case when path column is not the first column.
0.9.3 - 2023-05-28ΒΆ
ChangedΒΆ
Tree Constructor: Relax type hint to
Iterableinstead ofListforlist_to_treeandlist_to_tree_by_relationmethods.
FixedΒΆ
Node: Fix error message when trees have different
sep.
0.9.2 - 2023-04-09ΒΆ
AddedΒΆ
Node: Added
showmethod to print tree to console.Workflow Calendar: Tree use case with calendar implementation.
0.9.1 - 2023-03-30ΒΆ
ChangedΒΆ
Node: Added
sepparameter to constructor instead of using getter and setter methods to setsep.
0.9.0 - 2023-03-29ΒΆ
AddedΒΆ
Tree Modifier: Ability to copy/shift nodes with full path in
from_pathsfor faster search performance, addedwith_full_pathparameter.
ChangedΒΆ
Tree Modifier: Enforced paths in
to_pathsto be full path for faster search performance.Tree Modifier: Faster creation of intermediate parent nodes in
to_paths.Tree Modifier: Better handling of
sepin paths by performing string replacement at the start.Tree Modifier: Check and throw error for invalid parameters, case when node is meant to be deleted but
copy=True.
FixedΒΆ
Tree Modifier: Fix issue trailing
sepdiffering infrom_pathsandto_pathswhich should not throw error.
0.8.4 - 2023-03-24ΒΆ
AddedΒΆ
Tree Search: Implement
find_childandfind_childrento find single child or multiple children based on user-defined condition.
ChangedΒΆ
Tree and DAG Constructor: Reduce reliance on
numpypackage, only rejectNoneattributes when creating tree from DataFrame (previously it rejects[None]).Tree Helper: Get difference between two trees reduce reliance on
numpypackage, enhance test cases.Tree Search: Renamed
find_childrentofind_child_by_namefor clarity.Misc: Fix README for Windows installation.
0.8.3 - 2023-03-16ΒΆ
ChangedΒΆ
Workflow: Misc refactor and update log statements.
Misc: Fix coverage report.
0.8.2 - 2023-03-16ΒΆ
ChangedΒΆ
Misc: Type checking to remove optional requirement for
mypy.Misc: Shift .flake8, .mypy.ini, and pytest.ini files to pyproject.toml.
0.8.1 - 2023-03-10ΒΆ
FixedΒΆ
Tree Modifier: Fix issue of
sepof tree differing from thesepinfrom_pathsandto_paths.
0.8.0 - 2023-03-10ΒΆ
AddedΒΆ
Misc: Type checking with
mypy, added type checks to pre-commit hooks.
ChangedΒΆ
DAGNode:
go_tomethod to be consistent withList[List[DAGNode]]type.
FixedΒΆ
Tree Exporter: Exception handling in
yield_treeifnode_name_or_pathis not found.Workflow: Exception handling in prioritizing item/list if item/list is not the correct tree depth.
Workflow: Exception handling in removing item/list if item/list is not found.
0.7.4 - 2023-02-27ΒΆ
FixedΒΆ
Tree Constructor: Fixed pandas SettingwithCopyWarning when performing dataframe operations.
0.7.3 - 2023-02-25ΒΆ
AddedΒΆ
Tree Exporter: Fixed
print_treechecking attributes withhasattrto handle cases of null or 0 value attributes, add more test cases.Misc: Added more description to Contributing.
0.7.2 - 2023-02-18ΒΆ
AddedΒΆ
Tree Exporter: Added
node_shapeparameter intree_to_dotexport function for easier way to customize node shape.
0.7.1 - 2023-02-18ΒΆ
AddedΒΆ
BaseNode/Node: Added
go_toBaseNode method to travel from one node to another node from the same tree.DAGNode: Added
go_toDAGNode method to travel from one node to another node from the same DAG.
0.7.0 - 2023-02-18ΒΆ
AddedΒΆ
Tree Modifier: Accept
merge_leavestype of modification, enhance documentation to provide more examples and illustrations.
0.6.10 - 2023-01-23ΒΆ
FixedΒΆ
Tree Constructor:
str_to_treeaccept prefixes to support unicode characters in node names.
0.6.9 - 2023-01-22ΒΆ
AddedΒΆ
Tree Construct:
str_to_treeto construct tree from tree string.
0.6.8 - 2023-01-14ΒΆ
FixedΒΆ
Tree Exporter:
tree_to_dotto perform dictionary copy to prevent style from being overridden for child nodes.
0.6.7 - 2023-01-09ΒΆ
ChangedΒΆ
Binary Tree: Changed
BNodetoBinaryNode, and construct methodlist_to_btreetolist_to_binarytree.
0.6.6 - 2022-12-15ΒΆ
AddedΒΆ
Tree Exporter: Export
print_treeoutput to image using Pillow package.
0.6.5 - 2022-12-07ΒΆ
AddedΒΆ
Tree Modifier: Shift/copy nodes able to shift node-only and delete the children (backwards-compatible).
0.6.4 - 2022-11-16ΒΆ
FixedΒΆ
BNode: Minor fix on rollback functionality when original children includes None.
0.6.3 - 2022-11-15ΒΆ
AddedΒΆ
DAGNode: Rollback functionality to original state when there is error setting parent and children (backwards-compatible).
ChangedΒΆ
BaseNode, BNode, DAGNode: Refactor by abstracting checks.
FixedΒΆ
BaseNode: Fix rollback logic to handle failure in pre-assign checks and reassigning same child / parent.
BNode: Fix issue of reassigning children shifting existing child from right to left.
0.6.2 - 2022-11-15ΒΆ
ChangedΒΆ
Tree Modifier: Shorter logging messages.
0.6.1 - 2022-11-14ΒΆ
ChangedΒΆ
Tree Modifier: Handle shifting/copying that removes intermediate layer (backwards-compatible).
0.6.0 - 2022-11-13ΒΆ
AddedΒΆ
BaseNode: Rollback functionality to original state when there is error setting parent and children (backwards-compatible).
BaseNode and DAGNode: Type hints.
BNode: Node class for Binary Tree.
BTree Constructor: From list.
BNode Iterator: Level-Order Iterator.
Misc: Add Tips and Tricks to documentation (List Directory).
FixedΒΆ
DAGNode: Fix issue of duplicate parent constructor creating duplicate children.
0.5.5 - 2022-11-12ΒΆ
AddedΒΆ
Misc: More docstring examples.
Misc: More test cases.
FixedΒΆ
Tree Modifier: Fix issue with
merge_childrenargument not working as expected.
0.5.4 - 2022-11-12ΒΆ
AddedΒΆ
BaseNode: Add sort() to sort children.
Node: Made more extendable with pre-/post-assign checks.
Misc: Add Tips and Tricks to documentation (Extending Nodes).
Misc: More test cases.
FixedΒΆ
Tree Search: Type hints.
0.5.3 - 2022-11-11ΒΆ
AddedΒΆ
DAG and Tree Exporter: More customizations allowed on edges.
Add Tips and Tricks to documentation (Weighted Trees, Merging Trees).
FixedΒΆ
Tree Modifier: Fix issue with
merge_childrenargument not working as expected.
0.5.2 - 2022-11-10ΒΆ
FixedΒΆ
Tree Constructor: Fix issue
dataframe_to_tree_by_relationunable to find parent node.
0.5.1 - 2022-11-09ΒΆ
AddedΒΆ
Misc: Clean codes and documentation.
0.5.0 - 2022-11-09ΒΆ
AddedΒΆ
Misc: Clean codes and documentation.
ChangedΒΆ
Tree Exporter: Printing tree to group multiple arguments together.
DAG and Tree Exporter: Export to dot able to plot multiple disjointed trees/dags, rename
bgcolortobg_colour.
0.4.6 - 2022-11-09ΒΆ
AddedΒΆ
Tree Constructor: From DataFrame of parent-child columns.
ChangedΒΆ
Tree Exporter: Printing tree to define node name or path, and default to const style.
Tree Constructor: Rename
list_to_tree_tuplestolist_to_tree_by_relation.Tree Constructor: Remove parameter
sepfornested_dict_to_tree.
0.4.5 - 2022-11-08ΒΆ
ChangedΒΆ
Tree Exporter: Printing tree with added ability to omit null attributes.
0.4.4 - 2022-11-08ΒΆ
FixedΒΆ
Tree Constructor: Handle adding attributes that are array-like - add array even when one of the items is null.
0.4.3 - 2022-11-08ΒΆ
AddedΒΆ
Node: Print format for BaseNode.
0.4.2 - 2022-11-08ΒΆ
FixedΒΆ
Tree Constructor: For list of tuples, handle cases where parent name is None.
0.4.1 - 2022-11-07ΒΆ
FixedΒΆ
Tree Constructor: Handle adding attributes that are array-like - error in drop_duplicate() and pd.isnull().
0.4.0 - 2022-11-07ΒΆ
AddedΒΆ
Tree Constructor: From list of tuples of parent-child.
0.3.3 - 2022-11-07ΒΆ
AddedΒΆ
DAG Exporter: To list, nested dictionary, pandas DataFrame.
ChangedΒΆ
BaseNode and DAGNode: Modify docstring.
Tree Exporter: Support Nodes with same name.
Tree Modifier: Modify docstring.
Utility Iterator: Modify docstring.
0.3.2 - 2022-11-07ΒΆ
FixedΒΆ
Tree Exporter: Fix edge direction error.
0.3.1 - 2022-11-07ΒΆ
AddedΒΆ
Tree and DAG Exporter: More customizations for Node to dot and DAGNode to dot.
0.3.0 - 2022-11-05ΒΆ
AddedΒΆ
DAG Constructor: From list, nested dictionary, pandas DataFrame.
Utility Iterator: DAG traversal methods.
ChangedΒΆ
Tree Exporter and DAG Exporter: More customizations for Node to dot and DAGNode to dot.
0.2.0 - 2022-11-03ΒΆ
AddedΒΆ
Node: DAGNode for creating DAG graph.
Tree Exporter: Support Node to dot which can export to png, svg, jpeg, dot files.
DAG Exporter: Support DAGNode to dot.
0.1.0 - 2022-11-01ΒΆ
AddedΒΆ
Node: Node and BaseNode.
Tree Constructor: From list, nested dictionary, pandas DataFrame.
Tree Exporter: To list, nested dictionary, pandas DataFrame.
Tree Helper: Cloning, pruning trees, get difference between two trees.
Tree Modifier: Shift and copy nodes within tree and between trees.
Tree Search: Find single or multiple nodes based on name, attribute, or custom criteria.
Utility Iterator: Tree traversal methods.
Workflow To Do App: Tree use case with to-do list implementation.