No test coverage for most of the codebase #7

Open
opened 2026-03-19 17:30:13 +00:00 by llabeyrie · 0 comments
Owner

Description

Only 2 test files exist, both inside clean-text-to-keywords/:

  • test_keyword_extractor.py
  • test_json_inference.py

Missing test coverage

File Test coverage Risk
app.py None Broken subprocess + unpacking bugs would be caught
prompt_to_card_pipeline.py None Core orchestration — most complex file
card_generator_adapter.py None LoRA loading, prompt conditioning
fetch_card.py None Data pipeline, concurrent downloads
text-cleaner/text_cleaning_pipeline.py None Text cleaning — foundational stage

Additional gaps

  • No integration tests for the full 3-stage pipeline
  • No edge-case tests (empty input, unicode, very long text)
  • No error-path tests (missing files, failed imports, malformed JSON)
  • Tests are run with unittest — no pytest configuration or test runner at project root
  • No CI to run tests on push

Suggested actions

  1. Add pytest as dev dependency
  2. Create root-level tests/ directory
  3. Add unit tests for text_cleaning_pipeline.py and card_generator_adapter.py
  4. Add integration test for the pipeline with mocked model
## Description Only 2 test files exist, both inside `clean-text-to-keywords/`: - `test_keyword_extractor.py` - `test_json_inference.py` ### Missing test coverage | File | Test coverage | Risk | |------|--------------|------| | `app.py` | **None** | Broken subprocess + unpacking bugs would be caught | | `prompt_to_card_pipeline.py` | **None** | Core orchestration — most complex file | | `card_generator_adapter.py` | **None** | LoRA loading, prompt conditioning | | `fetch_card.py` | **None** | Data pipeline, concurrent downloads | | `text-cleaner/text_cleaning_pipeline.py` | **None** | Text cleaning — foundational stage | ### Additional gaps - No integration tests for the full 3-stage pipeline - No edge-case tests (empty input, unicode, very long text) - No error-path tests (missing files, failed imports, malformed JSON) - Tests are run with `unittest` — no `pytest` configuration or test runner at project root - No CI to run tests on push ### Suggested actions 1. Add `pytest` as dev dependency 2. Create root-level `tests/` directory 3. Add unit tests for `text_cleaning_pipeline.py` and `card_generator_adapter.py` 4. Add integration test for the pipeline with mocked model
llabeyrie added the priority: mediumtesting labels 2026-03-19 17:31:42 +00:00
Sign in to join this conversation.