Skip to content

docs: changelog, roadmap and contributor guide for the typed detector interface (#179) - #202

Merged
adaamko merged 5 commits into
stateless_corefrom
179-changelog
Nov 22, 2026
Merged

adaamko merged 5 commits into
stateless_corefrom
179-changelog

Conversation

@adaamko

@adaamko adaamko commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Ticket 15 of #126: the changelog, roadmap and contributor guide for the typed detector interface, plus two gaps found while writing the changelog from the code.

What changes

  • Write the changelog and roadmap entries and set the deprecation constants #180 CHANGELOG.md gets the 0.3.0 entry with "Added", "Changed" and "Deprecated" sections, written from the code on this branch. PUBLIC_ROADMAP.md gets a "Next: 0.3.0" section with the follow-ups, after the 0.2.4 section. The package version is 0.3.0 in pyproject.toml and lettucedetect/__init__.py. DEPRECATED_SINCE and REMOVED_IN already held 0.3.0 and 0.5.0.
  • Update CONTRIBUTING for the new detector interface and test deprecation notes #181 CONTRIBUTING.md describes adding a detector by implementing _detect, running the contract suite and the registry. A new test reads the "Deprecated" section of the changelog, resolves each name and checks its docstring for the .. deprecated:: note, the replacement and the removal version.
  • The predict* methods warn. predict, predict_prompt and predict_prompt_batch were listed as deprecated but emitted no warning. A call from outside the package now warns once, naming detect or detect_batch. Calls from inside the package are silent, so HallucinationDetector does not warn. Nested calls (the bridge through an overridden predict, the default batch loop, a super().predict() chain) do not warn a second time.
  • TaxonomyTyper(model_path, ...) works again. The constructor takes loaded objects, and the old call raised TypeError. The old form now loads through from_pretrained and warns, naming TaxonomyTyper.from_pretrained.

Worth a look in review

  • The predict* warning uses a per-thread depth counter so that only the outermost call warns. tests/test_predict_deprecated_pytest.py covers every detector class and the nested cases.
  • One case gives two warnings on the first call: predict_prompt_batch on a third-party class that implements only predict*. It gets the method warning and the once-per-class warning that was already there.
  • Two scripts now warn when run: scripts/evaluate_span_model.py --method vela and scripts/evaluate_lfm_span_model.py. They call predict* on a detector directly.
  • Existing tests that call predict* directly gained the marker that allows the deprecation warning. No golden fixture changed.
  • Invalid arguments of TransformerDetector and an unknown make_detector method still raise a plain ValueError; the changelog names only the classes whose errors changed.
  • The token output of LLMDetector and RAGFactCheckerDetector has no replacement on the new interface; the changelog says so.
  • main has an [Unreleased] changelog section, so the merge into main will need a small conflict resolution there.

Testing

The full suite passes locally; ruff check and ruff format --check are clean.

Rights & sign-off (required)

  • I certify that I have the right to submit this code and that it may be
    distributed under the repository's MIT license
    (see CONTRIBUTING).

@adaamko adaamko self-assigned this Nov 22, 2026
…ted and head the 0.3.0 roadmap section Next (#179)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant