Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-toml
- id: debug-statements
- id: end-of-file-fixer
- id: name-tests-test
args: ["--pytest-test-first"]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ 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.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`.
Expand Down Expand Up @@ -341,6 +346,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.13.1]: https://github.com/kayjan/bigtree/compare/0.13.0...0.13.1
[0.13.0]: https://github.com/kayjan/bigtree/compare/0.12.5...0.13.0
[0.12.5]: https://github.com/kayjan/bigtree/compare/0.12.4...0.12.5
[0.12.4]: https://github.com/kayjan/bigtree/compare/0.12.3...0.12.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.13.0"
__version__ = "0.13.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 tests/binarytree/test_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
list_to_tree_by_relation,
nested_dict_to_tree,
)
from tests.constants import Constants
from tests.node.test_binarynode import assert_binarytree_structure_root2
from tests.test_constants import Constants


class BinaryNodeA(BinaryNode):
Expand Down
2 changes: 1 addition & 1 deletion tests/binarytree/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
tree_to_nested_dict,
)
from tests.conftest import assert_print_statement
from tests.constants import Constants
from tests.test_constants import Constants

LOCAL = Constants.LOCAL

Expand Down
2 changes: 1 addition & 1 deletion tests/dag/test_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

from bigtree.dag.construct import dataframe_to_dag, dict_to_dag, list_to_dag
from bigtree.node.dagnode import DAGNode
from tests.constants import Constants
from tests.node.test_dagnode import (
assert_dag_structure_root,
assert_dag_structure_root_attr,
)
from tests.test_constants import Constants


class DAGNodeA(DAGNode):
Expand Down
2 changes: 1 addition & 1 deletion tests/dag/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
dict_to_dag,
list_to_dag,
)
from tests.constants import Constants
from tests.node.test_dagnode import (
assert_dag_structure_root,
assert_dag_structure_root_attr,
)
from tests.test_constants import Constants

LOCAL = Constants.LOCAL

Expand Down
2 changes: 1 addition & 1 deletion tests/node/test_basenode.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from bigtree.utils.exceptions import LoopError, TreeError
from bigtree.utils.iterators import preorder_iter
from tests.conftest import assert_print_statement
from tests.constants import Constants
from tests.test_constants import Constants


class BaseNode2(BaseNode):
Expand Down
2 changes: 1 addition & 1 deletion tests/node/test_binarynode.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from bigtree.tree.helper import clone_tree
from bigtree.utils.exceptions import LoopError, TreeError
from tests.conftest import assert_print_statement
from tests.constants import Constants
from tests.test_constants import Constants


class BinaryNode2(BinaryNode):
Expand Down
2 changes: 1 addition & 1 deletion tests/node/test_dagnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from bigtree.utils.exceptions import LoopError, TreeError
from bigtree.utils.iterators import dag_iterator
from tests.conftest import assert_print_statement
from tests.constants import Constants
from tests.test_constants import Constants


class DAGNode2(DAGNode):
Expand Down
2 changes: 1 addition & 1 deletion tests/node/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
from bigtree.utils.exceptions import LoopError, TreeError
from bigtree.utils.iterators import preorder_iter
from tests.conftest import assert_print_statement
from tests.constants import Constants
from tests.node.test_basenode import (
assert_tree_structure_basenode_root,
assert_tree_structure_basenode_root_attr,
assert_tree_structure_basenode_self,
)
from tests.test_constants import Constants


class TestNode(unittest.TestCase):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/tree/test_construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from bigtree.tree.search import find_name, find_names
from bigtree.utils.exceptions import DuplicatedNodeError, TreeError
from tests.conftest import assert_print_statement
from tests.constants import Constants
from tests.node.test_basenode import (
assert_tree_structure_basenode_root,
assert_tree_structure_basenode_root_attr,
Expand All @@ -32,6 +31,7 @@
assert_tree_structure_node_root,
assert_tree_structure_node_root_sep,
)
from tests.test_constants import Constants


class NodeA(Node):
Expand Down
2 changes: 1 addition & 1 deletion tests/tree/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
tree_to_pillow,
)
from tests.conftest import assert_print_statement
from tests.constants import Constants
from tests.node.test_basenode import (
assert_tree_structure_basenode_root,
assert_tree_structure_basenode_root_attr,
)
from tests.node.test_node import assert_tree_structure_node_root
from tests.test_constants import Constants

tree_node_str = """a [age=90]\n├── b [age=65]\n│ ├── d [age=40]\n│ └── e [age=35]\n│ ├── g [age=10]
│ └── h [age=6]\n└── c [age=60]\n └── f [age=38]\n"""
Expand Down
2 changes: 1 addition & 1 deletion tests/tree/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
from bigtree.tree.helper import clone_tree, get_tree_diff, prune_tree
from bigtree.utils.exceptions import NotFoundError, SearchError
from tests.conftest import assert_print_statement
from tests.constants import Constants
from tests.node.test_basenode import (
assert_tree_structure_basenode_root,
assert_tree_structure_basenode_root_attr,
)
from tests.test_constants import Constants


class TestCloneTree:
Expand Down
2 changes: 1 addition & 1 deletion tests/tree/test_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
from bigtree.tree.modify import copy_nodes, copy_nodes_from_tree_to_tree, shift_nodes
from bigtree.tree.search import find_name, find_path
from bigtree.utils.exceptions import NotFoundError, TreeError
from tests.constants import Constants
from tests.node.test_basenode import (
assert_tree_structure_basenode_root,
assert_tree_structure_basenode_root_attr,
)
from tests.node.test_node import assert_tree_structure_node_root
from tests.test_constants import Constants


class TestCopyNodes(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/tree/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
findall,
)
from bigtree.utils.exceptions import SearchError
from tests.constants import Constants
from tests.test_constants import Constants


class TestSearch(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/workflows/test_todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from bigtree import AppToDo
from bigtree.utils.exceptions import SearchError
from tests.conftest import assert_console_output
from tests.constants import Constants
from tests.test_constants import Constants


class TestAppToDo(unittest.TestCase):
Expand Down