Treeswift

Latest version: v1.1.42

Safety actively analyzes 625951 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

1.1.42

* 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
* However, the most likely use case is for the user to do something like `tree.extract_tree_without(single_label)`, which would result 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](https://github.com/niemasd/TreeSwift/releases/tag/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)

1.1.41

* Added `Tree.find_node()` and `Node.num_nodes()`

1.1.40

* Added warning if `suppress_unifurcations` will delete a `Node` that has a label and/or `node_params`/`edge_params`
* To suppress all warnings in a Python script, you can add `warnings.filterwarnings('ignore')` to the top of the script
* See the [relevant Python documentation](https://docs.python.org/3/library/warnings.html#temporarily-suppressing-warnings) for more details regarding handling warnings
* Thanks, pekarj!

1.1.39

* Fixed a bug in `Tree.distance_between` when one node is the other's parent
* Thanks, yueyujiang!

1.1.38

* Fixed a typo that caused infinite recursion when attempting to copy a `treeswift.Node` object (thanks, JSdoubleL!)

1.1.37

* Added `write_tree_nexus` function to `Tree` objects

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.