Closed yukiregista closed 3 months ago
↓こんなものはなかった
ConsensusProj) atsu1712@takedanoMac-Studio ConsensusProj % pytest -s tests/test_first_K_match
============================= test session starts ==============================
platform darwin -- Python 3.12.3, pytest-8.3.2, pluggy-1.5.0
rootdir: /Users/atsu1712/work/ConsensusProj
configfile: pyproject.toml
plugins: anyio-4.3.0
collected 0 items
============================ no tests ran in 0.00s =============================
ERROR: file or directory not found: tests/test_first_K_match
(ConsensusProj) atsu1712@takedanoMac-Studio ConsensusProj % ls
ConsensusProj docs setup.py
LICENSE example_notebook src
README.md memo.md tests
Untitled.ipynb pyproject.toml
diagonostics scripts
(ConsensusProj) atsu1712@takedanoMac-Studio ConsensusProj % ls test
ls: test: No such file or directory
(ConsensusProj) atsu1712@takedanoMac-Studio ConsensusProj % ls tests
__init__.py test_first_K_match.py
sample100-20240725T002653Z-001.zip test_greedy.py
test_base_consensus.py test_metric.py
test_basic.py test_visualize.py
(ConsensusProj) atsu1712@takedanoMac-Studio ConsensusProj % pytest -s tests/test_first_K_match
============================= test session starts ==============================
platform darwin -- Python 3.12.3, pytest-8.3.2, pluggy-1.5.0
rootdir: /Users/atsu1712/work/ConsensusProj
configfile: pyproject.toml
plugins: anyio-4.3.0
collected 0 items
============================ no tests ran in 0.00s =============================
ERROR: file or directory not found: tests/test_first_K_match
(ConsensusProj) atsu1712@takedanoMac-Studio ConsensusProj % pytest -s tests/test_first_K_match.py
============================= test session starts ==============================
platform darwin -- Python 3.12.3, pytest-8.3.2, pluggy-1.5.0
rootdir: /Users/atsu1712/work/ConsensusProj
configfile: pyproject.toml
plugins: anyio-4.3.0
collected 1 item
tests/test_first_K_match.py /Users/atsu1712/work/ConsensusProj/src/Consensus/example_data/sample1.nex
((((((((((((((((S42,S44)1.000000:0.14434,S43)0.919764:0.054413,(S39,S38)1.000000:3.416563)0.481177:0.012195,S40)1.000000:0.423053,(S46,S47)1.000000:6.50329)1.000000:0.367879,S41)0.999883:0.096156,(S37,S48)0.999239:0.083102)0.633310:0.021983,S36)0.559094:0.059964,(((((S56,S57)0.796987:0.032815,((S60,S55)0.682640:0.025004,(S59,S58)0.854019:0.039115)0.766203:0.029518)0.836430:0.042868,S54)1.000000:2.025828,(((S49,S50)0.958314:0.051241,S51)1.000000:6.50329,(S53,S52)1.000000:4.143429)1.000000:1.21517)1.000000:0.775676,((((((S66,S61)0.892476:0.040051,S65)0.873314:0.037997,(S63,S64)0.542524:0.015371)0.626590:0.025268,S62)0.815653:0.035436,(S68,S67)0.836528:0.035332)1.000000:6.50329,S45)1.000000:0.155315)0.999996:0.113117)1.000000:0.607928,(((((((S74,S75)1.000000:2.313635,S73)1.000000:4.108239,S71)0.876267:0.039845,(S72,S70)0.945896:0.056823)1.000000:0.435157,(((S77,S76)1.000000:6.50329,(S79,S78)1.000000:1.49321)1.000000:0.262286,S80)1.000000:0.8078)1.000000:0.460906,S69)0.999702:0.090945,((((S88,S87)0.752723:0.030621,(S89,S90)1.000000:6.50329)0.904872:0.047802,S86)1.000000:3.045397,((S84,S85)1.000000:0.203309,(S83,(S81,S82)0.831024:0.035623)1.000000:3.977561)1.000000:3.585519)1.000000:3.519163)1.000000:0.925048)1.000000:6.50329,(S91,S92)1.000000:6.50329)1.000000:1.334268,((S96,S95)1.000000:6.50329,((S98,(S100,S99)1.000000:2.607689)1.000000:0.531322,((S94,S93)1.000000:6.50329,S97)1.000000:2.862908)1.000000:0.888541)1.000000:6.50329)1.000000:0.272108,S35)1.000000:2.263403,((((((S13,S18)0.688826:0.025636,(S14,S19)0.885403:0.044103)0.998568:0.079318,(S17,S16)1.000000:2.470132)0.999752:0.089804,S15)1.000000:2.439444,(((((S33,S30)0.912264:0.046132,S31)0.808166:0.040392,(S28,S29)0.968798:0.060431)0.979970:0.057339,S32)1.000000:0.976244,S34)1.000000:6.50329)1.000000:0.167792,((((((S26,S24)0.799862:0.051517,S23)0.621804:0.019928,S25)1.000000:0.919886,S27)0.993514:0.068457,S22)1.000000:0.131095,(S20,S21)1.000000:1.603397)1.000000:0.313487)1.000000:6.50329)1.000000:3.367795,((((S4,S6)0.422885:0.008834,S5)1.000000:2.667819,(((S9,S10)1.000000:1.798368,(S11,S12)1.000000:4.29972)1.000000:1.850031,S8)0.768728:0.038359)0.999929:0.099936,S7)1.000000:6.50329)1.000000:3.558851,(S1,S2)1.000000:6.50329,S3);
F
=================================== FAILURES ===================================
______________________________ test_first_K_match ______________________________
K = 20
def test_first_K_match(K=20):
# example trees
print(files('Consensus.example_data').joinpath('sample1.nex'))
tree1 = Consensus.Tree_with_support.get(path = files('Consensus.example_data').joinpath('true.nex'), schema="nexus")
tree2 = Consensus.Tree_with_support.get(path = files('Consensus.example_data').joinpath('astral_GTRgamma.tre'), schema="newick",
taxon_namespace = tree1.taxon_namespace)
## For using booster
tree1_str = tree1.as_string("newick", suppress_rooting=True)
tree2_str = tree2.as_string("newick", suppress_rooting=True)
print(tree2_str)
> booster_lib = Consensus.load_booster()
tests/test_first_K_match.py:67:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def load_booster():
spec = importlib.util.find_spec("booster")
if spec is None or spec.origin is None:
> raise ImportError("Cannot find the 'booster' shared library")
E ImportError: Cannot find the 'booster' shared library
src/Consensus/_booster.py:12: ImportError
=============================== warnings summary ===============================
ConsensusProj/lib/python3.12/site-packages/ete3/webplugin/webapp.py:44
/Users/atsu1712/work/ConsensusProj/ConsensusProj/lib/python3.12/site-packages/ete3/webplugin/webapp.py:44: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import cgi
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_first_K_match.py::test_first_K_match - ImportError: Cannot find the 'booster' shared library
========================= 1 failed, 1 warning in 1.58s =========================
(ConsensusProj) atsu1712@takedanoMac-Studio ConsensusProj %
多分soファイルができてないですね... booster/srcの中にできるはずですよね?
@atsuhmd kマッチのテストの実装と修正までできたので、このブランチ(
43-k-best-match
)で以下の確認後、このPRを承認してもらえますでしょうか?git pull
後に、git submodule update --init --recursive
でサブモジュールの追加(booster)pip install -e .
でインストール、boosterの.soファイルができることを確認pytest -s tests/test_first_K_match
がエラーを吐かないことを確認