Skip to content

[P0] Fix packaging & lazy imports so code2test runs #8

@pro-utkarshM

Description

@pro-utkarshM

Problem

code2test --help fails: ModuleNotFoundError: No module named 'code2test' / click. Editable install links the package but dependencies are not installed, and code2test/__init__.py:14 eager-imports code2test.cli.main at top level — any missing dep breaks import code2test entirely.

Tasks

  • Make code2test/__init__.py lazy: do not import cli.main at module top. Expose CLI via entry point only / lazy attribute.
  • Verify clean install path: pip install -e ".[dev]" in a fresh venv pulls all deps (click, rich, litellm, etc.).
  • Pin/verify requires-python against tested interpreters (repo venv is 3.14; pyproject says >=3.12 — confirm support or constrain).
  • Smoke test: fresh venv → install → code2test --help exits 0.

Acceptance

code2test --help and code2test test --help run with zero import errors in a fresh venv.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Blocker / must fix to run

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions