Skip to content

Commit 245bc0d

Browse files
authored
Bigtree Studio (#455)
* feat: rename node * feat: rename node for Node + add defaults to common module * feat: bigtree studio * docs: update docs for studio + create script for shortcut * docs: update CHANGELOG
1 parent 23797ea commit 245bc0d

17 files changed

Lines changed: 849 additions & 28 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ 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

77
## [Unreleased]
8+
9+
## [1.5.0]
810
### Added:
911
- BaseNode: Method `get_common_ancestors` for getting common ancestors, this was already available in parsing module.
1012
- Node: Method `rename` to rename node safely.
13+
- Studio: Terminal interface for Trees.
1114
### Changed:
1215
- Docs: Enumerate the demonstration page, fix url links.
1316
- Docs: Update demonstration to include query examples.
@@ -927,7 +930,8 @@ ignore null attribute columns.
927930
- Utility Iterator: Tree traversal methods.
928931
- Workflow To Do App: Tree use case with to-do list implementation.
929932

930-
[Unreleased]: https://github.com/kayjan/bigtree/compare/1.4.1...HEAD
933+
[Unreleased]: https://github.com/kayjan/bigtree/compare/1.5.0...HEAD
934+
[1.5.0]: https://github.com/kayjan/bigtree/compare/1.4.1...1.5.0
931935
[1.4.1]: https://github.com/kayjan/bigtree/compare/1.4.0...1.4.1
932936
[1.4.0]: https://github.com/kayjan/bigtree/compare/1.3.1...1.4.0
933937
[1.3.1]: https://github.com/kayjan/bigtree/compare/1.3.0...1.3.1

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ For **Tree** implementation, there are 12 main components.
3434
2. ``Node``, BaseNode with node name attribute
3535
2. [**🎄 Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/tree/)
3636
1. ``Tree``, wrapper around ``Node``, providing high-level APIs to build, iterate, query, and export the entire tree structure
37-
3. [**✨ Constructing Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/construct/)
37+
3. [**🎬 Studio**](https://bigtree.readthedocs.io/stable/gettingstarted/demo/tree_studio/)
38+
1. Construct, modify, search, export tree with a Terminal interface
39+
4. [**✨ Constructing Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/construct/)
3840
1. From `Node`, using parent and children constructors
3941
2. From *str*, using tree display or Newick string notation
4042
3. From *list*, using paths or parent-child tuples
@@ -46,46 +48,46 @@ For **Tree** implementation, there are 12 main components.
4648
9. Add nodes to existing tree using path string
4749
10. Add nodes and attributes to existing tree using *dictionary*, *pandas DataFrame*, or *polars DataFrame*, using path
4850
11. Add only attributes to existing tree using *dictionary*, *pandas DataFrame*, or *polars DataFrame*, using node name
49-
4. [**➰ Traversing Tree**](https://bigtree.readthedocs.io/stable/bigtree/utils/iterators/)
51+
5. [**➰ Traversing Tree**](https://bigtree.readthedocs.io/stable/bigtree/utils/iterators/)
5052
1. Pre-Order Traversal
5153
2. Post-Order Traversal
5254
3. Level-Order Traversal
5355
4. Level-Order-Group Traversal
5456
5. ZigZag Traversal
5557
6. ZigZag-Group Traversal
56-
5. [**🧩 Parsing Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/parsing/)
58+
6. [**🧩 Parsing Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/parsing/)
5759
1. Get common ancestors between nodes
5860
2. Get path from one node to another node
59-
6. [**📝 Modifying Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/modify/)
61+
7. [**📝 Modifying Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/modify/)
6062
1. Copy nodes from location to destination
6163
2. Shift nodes from location to destination
6264
3. Shift and replace nodes from location to destination
6365
4. Copy nodes from one tree to another
6466
5. Copy and replace nodes from one tree to another
65-
7. [**📌 Querying Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/query/)
67+
8. [**📌 Querying Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/query/)
6668
1. Filter tree using Tree Query Language
67-
8. [**🔍 Tree Search**](https://bigtree.readthedocs.io/stable/bigtree/tree/search/)
69+
9. [**🔍 Tree Search**](https://bigtree.readthedocs.io/stable/bigtree/tree/search/)
6870
1. Find multiple nodes based on name, partial path, relative path, attribute value, user-defined condition
6971
2. Find single nodes based on name, partial path, relative path, full path, attribute value, user-defined condition
7072
3. Find multiple child nodes based on user-defined condition
7173
4. Find single child node based on name, user-defined condition
72-
9. [**🔧 Helper Function**](https://bigtree.readthedocs.io/stable/bigtree/tree/helper/)
73-
1. Cloning tree to another `Node` type
74-
2. Get subtree (smaller tree with different root)
75-
3. Prune tree (smaller tree with same root)
76-
4. Get difference between two trees
77-
10. [**📊 Plotting Tree**](https://bigtree.readthedocs.io/stable/bigtree/utils/plot/)
74+
10. [**🔧 Helper Function**](https://bigtree.readthedocs.io/stable/bigtree/tree/helper/)
75+
1. Cloning tree to another `Node` type
76+
2. Get subtree (smaller tree with different root)
77+
3. Prune tree (smaller tree with same root)
78+
4. Get difference between two trees
79+
11. [**📊 Plotting Tree**](https://bigtree.readthedocs.io/stable/bigtree/utils/plot/)
7880
1. Enhanced Reingold Tilford Algorithm to retrieve (x, y) coordinates for a tree structure
7981
2. Plot tree using matplotlib (optional dependency)
80-
11. [**🔨 Exporting Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/export/)
82+
12. [**🔨 Exporting Tree**](https://bigtree.readthedocs.io/stable/bigtree/tree/export/)
8183
1. Print to console, in vertical or horizontal orientation
8284
2. Display on jupyter notebook
8385
3. Export to *html*, *Newick string notation*, *dictionary*, *nested dictionary*, *pandas DataFrame*, or *polars DataFrame*
8486
4. Export tree to *dot* (can save to .dot, .png, .svg, .jpeg files)
8587
5. Export tree to *Pillow* (can save to .png, .jpg)
8688
6. Export tree to *Mermaid Flowchart* (can display on .md)
8789
7. Export tree to *Pyvis Network* (can display interactive .html)
88-
12. [**✔️ Workflows**](https://bigtree.readthedocs.io/stable/bigtree/workflows/app_todo)
90+
13. [**✔️ Workflows**](https://bigtree.readthedocs.io/stable/bigtree/workflows/app_todo)
8991
1. Sample workflows for tree demonstration!
9092

9193
--------

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The latest version of bigtree is supported with security updates.
66

77
| Version | Supported |
8-
|-----------| ------------------ |
8+
|-----------|--------------------|
99
| >= 0.12.x | :white_check_mark: |
1010

1111

assets/docs/studio.png

334 KB
Loading

bigtree/__init__.py

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

33
from bigtree._globals import Globals
44
from bigtree.binarytree.binarytree import BinaryTree

bigtree/tree/studio/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)