Repository navigation
ci: add CI and cover reindex_1024_mac validation paths - #7
Merged
Merged
Conversation
The repository had no CI, and pytest.ini's 98% coverage gate failed on main at 97.08%: all 77 uncovered lines were in pubmed/reindex_1024_mac.py. tests/pubmed/test_reindex_1024_mac_validation.py adds offline tests for IndexingUnit name and path validation, the CLI's argument errors and internal worker-unit parsing, supervisor manifest records and worker_completion_recorded, malformed JSON/JSONL source records, validate_vectors shape and NaN checks, cleanup after an OSError, free_disk_gib, and the process_chunk compatibility entry point. Total coverage is now 98.56%. .github/workflows/ci.yml runs pytest (with the pytest.ini coverage gate) on Python 3.11 for pushes and pull requests to main. The tests import the scripts' real dependencies, so it installs CPU-only torch, sentence-transformers, faiss-cpu, and the rest, then removes hf_xet, which tests/pubmed asserts is absent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nxi4bp7DP1ancERNUUfzj
actions/setup-python's pip cache defaults to requirements.txt or pyproject.toml, neither of which exists here, so the job stopped before installing anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nxi4bp7DP1ancERNUUfzj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The repository had no CI, and the 98% coverage gate in
pytest.inifailed onmainat 97.08%. All 77 uncovered lines were inpubmed/reindex_1024_mac.py.New tests:
tests/pubmed/test_reindex_1024_mac_validation.py, offline and reusing the stubbed module from the checkpoint tests. It covers:IndexingUnitnamespace, name and remote-path validation;--worker-unitparsing;worker_completion_recorded;validate_vectors;OSError,free_disk_gib, and theprocess_chunkcompatibility entry point.Total coverage is now 98.56%: 179 tests pass, 18 of them new.
New CI:
.github/workflows/ci.ymlrunspytest, with thepytest.inicoverage gate, on Python 3.11 for pushes and PRs tomain.torch,sentence-transformers,faiss-cpu,numpy,requests,pyyamlandplaywright.hf_xet, whichtests/pubmedasserts is absent.Verified locally: the workflow's install step, replayed in a fresh Python 3.11 environment (torch from PyPI there, because the PyTorch index is blocked in the sandbox), then
pytest: 179 passed, coverage 98.56%.🤖 Generated with Claude Code
https://claude.ai/code/session_016nxi4bp7DP1ancERNUUfzj
Generated by Claude Code