Skip to content

TreeSwift v1.1.42

Choose a tag to compare

@niemasd niemasd released this 02 Apr 17:28
· 11 commits to master since this release
  • Updated Tree.extract_tree* function behavior
    • Before, if the user passed in any non-set iterable for labels, it would automatically run labels = set(labels) to convert it to a set
    • If the user passed in a string, this would result in a set containing the unique individual letters of the string
      • E.g. if labels == 'HELLO', this would result in labels == {'H', 'E', 'L', 'O'}
    • However, the most likely user behavior for passing in a single string as labels would be to do something like tree.extract_tree_without(single_label) to try to remove just that single label
      • This would have resulted in converting single_label (a string) into a set containing the unique letters of single_label
    • I've updated these functions to first check if labels is a string, and if so, run labels = {labels} instead (to convert it into a set containing just that single string)
    • Thanks for catching this, @pekarj!
  • The suppress_unifurcations warning I added in v1.1.40 would warn the user when deleting a Node that had a non-None label, node attributes, or edge attributes
    • I've updated this warning to also not warn the user when deleting a Node that only has the empty string as its label (and no node/edge attributes)