jeetsukumaran / DendroPy

A Python library for phylogenetic scripting, simulation, data processing and manipulation.
https://pypi.org/project/DendroPy/.
BSD 3-Clause "New" or "Revised" License
210 stars 61 forks source link

Fix broken tests, miscellaneous lint #158

Closed mmore500 closed 1 year ago

mmore500 commented 1 year ago

Opened independently from #157 to facilitate separate review because this will touch existing code/infrastructure and not just add new infrastructure.

mmore500 commented 1 year ago

Remaining cleanup:

[&U] ((((Morelia_bredli:0.0274921037,Morelia_spilota:0.0241663426):0.026356,((Morelia_tracyae:0.0377936102,((Morelia_clastolepis:0.0045446653,(Morelia_kinghorni:0.0075825724,Morelia_nauta:0.0086155842):0.004182):0.018597,Morelia_amethistina:0.0227641045):0.007181):0.024796,Morelia_oenpelliensis:0.0579745143):0.004283):0.031732,(Morelia_carinata:0.0660356718,(Morelia_viridisN:0.0377499268,Morelia_viridisS:0.0473589755):0.027329):0.028950999999999998):0.006602,Morelia_boeleni:0.0872464314):0.23768;

[&U] ((((Morelia_bredli:0.0274921037,Morelia_spilota:0.0241663426):0.026356,((Morelia_tracyae:0.0377936102,((Morelia_clastolepis:0.0045446653,(Morelia_kinghorni:0.0075825724,Morelia_nauta:0.0086155842):0.004182):0.018597,Morelia_amethistina:0.0227641045):0.007181):0.024796,Morelia_oenpelliensis:0.0579745143):0.004283):0.031732,(Morelia_carinata:0.0660356718,(Morelia_viridisN:0.0377499268,Morelia_viridisS:0.0473589755):0.027329):0.028950999999999998):0.006602,Morelia_boeleni:0.0872464314):0.23768;

[&U] ((((Morelia_bredli:0.0274921037,Morelia_spilota:0.0241663426):0.026356,((Morelia_tracyae:0.0377936102,((Morelia_clastolepis:0.0045446653,(Morelia_kinghorni:0.0075825724,Morelia_nauta:0.0086155842):0.004182):0.018597,Morelia_amethistina:0.0227641045):0.007181):0.024796,Morelia_oenpelliensis:0.0579745143):0.004283):0.031732,(Morelia_carinata:0.0660356718,(Morelia_viridisN:0.0377499268,Morelia_viridisS:0.0473589755):0.027329):0.028950999999999998):0.006602,Morelia_boeleni:0.0872464314):0.23768;

FAIL tree_extract3.py

- [x] `mrca2.py`
  - only on Python 2.7

mrca2.py Traceback (most recent call last): File "mrca2.py", line 15, in mrca.bipartition.split_as_bitstring(), File "/opt/hostedtoolcache/Python/2.7.18/x64/lib/python2.7/site-packages/dendropy/datamodel/treemodel/_bipartition.py", line 320, in split_as_bitstring mask=self._split_bitmask, symbol0=symbol0, symbol1=symbol1, reverse=reverse File "/opt/hostedtoolcache/Python/2.7.18/x64/lib/python2.7/site-packages/dendropy/datamodel/treemodel/_bipartition.py", line 361, in bitmask_as_bitstring length=bitprocessing.bit_length(self._tree_leafset_bitmask), File "/opt/hostedtoolcache/Python/2.7.18/x64/lib/python2.7/site-packages/dendropy/utility/bitprocessing.py", line 46, in bit_length s = bin(n) # binary representation: bin(-37) --> '-0b100101' TypeError: 'NoneType' object cannot be interpreted as an index FAIL mrca2.py

mmore500 commented 1 year ago

Able to reproduce tree_extract3.py with current Dendropy version locally.

mmore500 commented 1 year ago

Examples and tests are passing! Merging patches into setup-ci branch.