Skip to content

Python suite: 50 failures + no CI (collection fixed in #10) #9

Description

@chitcommit

Found while investigating a review comment on PR #6. Both breaks are on main and predate that branch.

The Python test suite has never been runnable on a case-sensitive filesystem (i.e. Linux, i.e. any CI).

Break 1 — pypdf2 vs PyPDF2

document_processor.py:9:

import pypdf2

requirements.txt:6 pins pypdf2>=3.0.0. pip normalizes the distribution name to lowercase, but the installed import name is PyPDF2:

$ python -c "import PyPDF2; print('ok')"   → ok
$ python -c "import pypdf2"                → ModuleNotFoundError: No module named 'pypdf2'

This works on macOS (case-insensitive filesystem) and fails everywhere else, which is the classic way this survives unnoticed. document_processor.py:77 also calls pypdf2.PdfReader(...), so the fix is both the import and the call site.

Note PyPDF2 3.0.1 itself warns: "PyPDF2 is deprecated. Please move to the pypdf library instead." Worth migrating to pypdf rather than just correcting the casing.

Break 2 — langchain.text_splitter moved

With break 1 patched locally, collection then fails:

ModuleNotFoundError: No module named 'langchain.text_splitter'

That module moved to the standalone langchain_text_splitters package in langchain 1.x, and requirements.txt currently resolves langchain 1.4.0.

Impact

document_processor → claude_openai_extension → the test module. Any import failure in that chain errors the whole suite at collection:

ERROR tests/integration/test_api_endpoints.py

An uncollectable suite reports as an error, but in a pipeline that only greps for failing assertions it reads as zero failures — a check you appear to have and do not.

Reproduce

python3 -m venv /tmp/v && /tmp/v/bin/pip install -r requirements.txt
/tmp/v/bin/python -m pytest tests/integration/test_api_endpoints.py::TestHealthEndpoint

Also worth deciding

Once collection is fixed, the suite's actual state is unknown — it may have accumulated further rot behind these two errors. Nothing has ever exercised it.

Separately: there is no CI running these tests at all. .github/workflows/ contains only chittyconnect-sync.yml, and main's branch protection has an empty required_status_checks.contexts list, so no check gates merge. Fixing the imports without adding a workflow that runs them would just re-hide this.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PSJp8eaY4ABrZKGkcD1xgM

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions