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 摘要。