LukeMathWalker / LukeMathWalker/linfa-python

poetry run pytest and module not found

未關閉
#3 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
13
分支
3
PR 合併指標
30 天內沒有已合併 PR

描述

`poetry run pytest`

==================================================================== test session starts ====================================================================
platform linux -- Python 3.8.1, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/frag/linfa-python
plugins: benchmark-3.2.3, asyncio-0.10.0
collected 0 items / 1 error

========================================================================== ERRORS ===========================================================================
__________________________________________________________ ERROR collecting tests/test_k_means.py ___________________________________________________________
ImportError while importing test module '/home/frag/linfa-python/tests/test_k_means.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_k_means.py:5: in
from linfa import KMeans
linfa/__init__.py:1: in
from .LinfaKMeans import KMeans, WrappedKMeans
linfa/LinfaKMeans.py:6: in
from .linfa import WrappedKMeans
E ModuleNotFoundError: No module named 'linfa.linfa'

`rustc -V`
rustc 1.40.0-nightly (0e8a4b441 2019-10-16)

`uname -a`
Linux amx-dev-lap 5.3.0-7629-generic #31~1581628825~19.10~f90b7d5-Ubuntu SMP Fri Feb 14 19:56:45 UTC x86_64 x86_64 x86_64 GNU/Linux

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 tests/test_k_means.py 開始,沿著 linfa/__init__.py 和 linfa/LinfaKMeans.py 追蹤 import。執行 poetry run pytest,並檢查缺少的 linfa.linfa 模組是如何產生或公開的;當測試收集能夠在沒有 ModuleNotFoundError 的情況下繼續時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python, rust
領域
build-system, testing
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。