fix(cli): register MarkItDown engine in the CLI router - #13
Merged
Conversation
The MarkItDown integration (PR #8) wired the adapter into the engine router priorities, pyproject extras, benchmark harness, and README, but _build_router() in docfold.cli never registered it. As a result 'docfold engines' did not list markitdown and 'docfold convert -e markitdown' failed with "Unknown engine". Register MarkItDownEngine like the other adapters, add a CLI test, and mark the MARKITDOWN_ENGINE task as done. E2E verified with markitdown 0.1.6: 'docfold engines' lists it and 'docfold convert -e markitdown' converts HTML and CSV to Markdown. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8piXZeKezQY5xLSooAh63
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.
Summary
Completes the MarkItDown integration started in #8. The adapter, router priorities,
pyproject.tomlextra, benchmark harness, README, and tests were all in place — but_build_router()indocfold/cli.pynever registered the engine, so:docfold enginesdid not list markitdowndocfold convert <file> -e markitdownfailed withUnknown engine 'markitdown'Changes
src/docfold/cli.py— registerMarkItDownEnginein_build_router()using the same try/except pattern as the other 20 engines.tests/test_cli.py— new testtest_registers_markitdown(written first, confirmed failing, then fixed — per the TDD golden rule).docs/tasks/MARKITDOWN_ENGINE.md— added the CLI to scope, checked off the completed test plan, marked the taskDONE.CHANGELOG.md— added aFixedentry under[Unreleased].Testing
pytest tests/— 332 passed, 3 skipped.ruff check— clean on changed files.markitdown0.1.6 installed:docfold enginesnow lists markitdown as available, anddocfold convert sample.html -e markitdown/docfold convert sample.csv -e markitdownproduce correct Markdown (headings, bold, tables).🤖 Generated with Claude Code
https://claude.ai/code/session_01P8piXZeKezQY5xLSooAh63
Generated by Claude Code