Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Remove dependency on anytree #7

Closed
@TomNicholas

Description

@TomNicholas

The code currently has a hard dependency on the anytree library, which it uses primarily to implement the actual .parent & .children structure of the TreeNode class, through inheritance from anytree.NodeMixin.

We don't need this dependency - anytree is not a big project, and we can simply reimplement the classes we need within this project instead. We should give due credit in the code because anytree has an Apache 2.0 license (plus Scout's honor).

Reimplementing anytree's functionality would also allow us to change various parts of it. For example we don't need support for python 2, we can standardize the error types (e.g. to return KeyError instead of e.g. anytree.ResolverError), and get rid of the mis-spelled .anchestors property. We shouldn't need to worry about breaking the code because the tree functionality is already covered by the unit tests in test_treenode.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions