Skip to content

Commit

Permalink
Merge pull request #72 from kayjan/v0.10.1
Browse files Browse the repository at this point in the history
V0.10.1
  • Loading branch information
Kay Jan authored Jul 26, 2023
2 parents 65bce8b + 5623dda commit 9bcefe4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.1] - 2023-07-27
### Added
- [#71] Node: `path_name` to 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_path` to find relative path from node.
Expand Down Expand Up @@ -289,6 +293,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Utility Iterator: Tree traversal methods.
- Workflow To Do App: Tree use case with to-do list implementation.

[0.10.1]: https://github.com/kayjan/bigtree/compare/0.10.0...0.10.1
[0.10.0]: https://github.com/kayjan/bigtree/compare/0.9.5...0.10.0
[0.9.5]: https://github.com/kayjan/bigtree/compare/0.9.4...0.9.5
[0.9.4]: https://github.com/kayjan/bigtree/compare/0.9.3...0.9.4
Expand Down
2 changes: 1 addition & 1 deletion bigtree/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.10.0"
__version__ = "0.10.1"

from bigtree.binarytree.construct import list_to_binarytree
from bigtree.dag.construct import dataframe_to_dag, dict_to_dag, list_to_dag
Expand Down
2 changes: 1 addition & 1 deletion bigtree/node/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def path_name(self) -> str:
"""
ancestors = [self] + list(self.ancestors)
sep = ancestors[-1].sep
return sep + sep.join([node.name for node in reversed(ancestors)])
return sep + sep.join([str(node.name) for node in reversed(ancestors)])

def __pre_assign_children(self: T, new_children: List[T]) -> None:
"""Custom method to check before attaching children
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "bigtree"
description = "Tree Implementation for Python, integrated with Python list, dictionary, and pandas DataFrame."
readme = "README.md"
requires-python = ">=3.7"
license = "MIT"
license = {text = "MIT"}
keywords = [
"tree",
"bigtree",
Expand Down
4 changes: 4 additions & 0 deletions tests/node/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ def test_set_children_error(self):
self.a.children = [self.b, self.b]
assert str(exc_info.value) == Constants.ERROR_SET_DUPLICATE_CHILD

def test_path_name_int(self):
b = Node(1, parent=self.a)
assert b.path_name == "/a/1"

def test_go_to(self):
self.a.children = [self.b, self.c]
self.b.children = [self.d, self.e]
Expand Down

0 comments on commit 9bcefe4

Please sign in to comment.