Skip to content

Commit 9bcefe4

Browse files
author
Kay Jan
authored
Merge pull request #72 from kayjan/v0.10.1
V0.10.1
2 parents 65bce8b + 5623dda commit 9bcefe4

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.10.1] - 2023-07-27
8+
### Added
9+
- [#71] Node: `path_name` to allow different node name of different dtypes; map everything to string type.
10+
711
## [0.10.0] - 2023-07-15
812
### Added
913
- [#65] Tree Search: Implement `find_relative_path` to find relative path from node.
@@ -289,6 +293,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
289293
- Utility Iterator: Tree traversal methods.
290294
- Workflow To Do App: Tree use case with to-do list implementation.
291295

296+
[0.10.1]: https://github.com/kayjan/bigtree/compare/0.10.0...0.10.1
292297
[0.10.0]: https://github.com/kayjan/bigtree/compare/0.9.5...0.10.0
293298
[0.9.5]: https://github.com/kayjan/bigtree/compare/0.9.4...0.9.5
294299
[0.9.4]: https://github.com/kayjan/bigtree/compare/0.9.3...0.9.4

bigtree/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.10.0"
1+
__version__ = "0.10.1"
22

33
from bigtree.binarytree.construct import list_to_binarytree
44
from bigtree.dag.construct import dataframe_to_dag, dict_to_dag, list_to_dag

bigtree/node/node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def path_name(self) -> str:
116116
"""
117117
ancestors = [self] + list(self.ancestors)
118118
sep = ancestors[-1].sep
119-
return sep + sep.join([node.name for node in reversed(ancestors)])
119+
return sep + sep.join([str(node.name) for node in reversed(ancestors)])
120120

121121
def __pre_assign_children(self: T, new_children: List[T]) -> None:
122122
"""Custom method to check before attaching children

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "bigtree"
77
description = "Tree Implementation for Python, integrated with Python list, dictionary, and pandas DataFrame."
88
readme = "README.md"
99
requires-python = ">=3.7"
10-
license = "MIT"
10+
license = {text = "MIT"}
1111
keywords = [
1212
"tree",
1313
"bigtree",

tests/node/test_node.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ def test_set_children_error(self):
260260
self.a.children = [self.b, self.b]
261261
assert str(exc_info.value) == Constants.ERROR_SET_DUPLICATE_CHILD
262262

263+
def test_path_name_int(self):
264+
b = Node(1, parent=self.a)
265+
assert b.path_name == "/a/1"
266+
263267
def test_go_to(self):
264268
self.a.children = [self.b, self.c]
265269
self.b.children = [self.d, self.e]

0 commit comments

Comments
 (0)