Skip to content

Commit 8aaa03d

Browse files
committed
v0.6.2 improved logging messages
1 parent 9f15237 commit 8aaa03d

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
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.6.2] - 2022-11-14
8+
### Changed
9+
- Tree Modifier: Shorter logging messages.
10+
711
## [0.6.1] - 2022-11-14
812
### Changed
913
- Tree Modifier: Handle shifting/copying that removes intermediate layer (backwards-compatible).
@@ -138,6 +142,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
138142
- Utility Iterator: Tree traversal methods.
139143
- Workflow To Do App: Tree use case with to-do list implementation.
140144

145+
[0.6.2]: https://github.com/kayjan/bigtree/compare/v0.6.1...v0.6.2
141146
[0.6.1]: https://github.com/kayjan/bigtree/compare/v0.6.0...v0.6.1
142147
[0.6.0]: https://github.com/kayjan/bigtree/compare/v0.5.5...v0.6.0
143148
[0.5.5]: https://github.com/kayjan/bigtree/compare/v0.5.4...v0.5.5

bigtree/__init__.py

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

33
from bigtree.btree.construct import list_to_btree
44
from bigtree.dag.construct import dataframe_to_dag, dict_to_dag, list_to_dag

bigtree/tree/modify.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def copy_or_shift_logic(
499499
to_node = parent
500500
else:
501501
raise TreeError(
502-
f"Attempting to shift the same node {from_node} back to the same position\n"
502+
f"Attempting to shift the same node {from_node.node_name} back to the same position\n"
503503
f"Check from path {from_path} and to path {to_path}\n"
504504
f"Alternatively, set `merge_children` to True if intermediate node is to be removed"
505505
)
@@ -562,10 +562,12 @@ def copy_or_shift_logic(
562562

563563
# Reassign from_node to new parent
564564
if copy:
565-
logging.info(f"Copying {from_node} to {to_node}")
565+
logging.info(f"Copying {from_node.node_name} to {to_node.node_name}")
566566
from_node = from_node.copy()
567567
if merge_children:
568-
logging.info(f"Reassigning children from {from_node} to {to_node}")
568+
logging.info(
569+
f"Reassigning children from {from_node.node_name} to {to_node.node_name}"
570+
)
569571
for children in from_node.children:
570572
children.parent = to_node
571573
from_node.parent = None

0 commit comments

Comments
 (0)