Skip to content

"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/

Python

fix(calibre): skip E2E gracefully and sync docs/test inventory

ChengYe3a9e4f7d8881
diff --git a/README.md b/README.md
index bce9049dc..38f1d253e 100644
--- a/README.md
+++ b/README.md
@@ -884,7 +884,7 @@ Each application received complete, production-ready CLI interfaces — not demo
<td>E-book Library Management</td>
<td><code>cli-anything-calibre</code></td>
<td>calibredb + ebook-convert + ebook-meta</td>
-<td align="center">✅ <a href="calibre/agent-harness/">38</a></td>
+<td align="center">✅ <a href="calibre/agent-harness/">58</a></td>
</tr>
<tr>
<td align="center"><strong>📝 <a href="mubu/agent-harness/">Mubu</a></strong></td>
diff --git a/calibre/agent-harness/CALIBRE.md b/calibre/agent-harness/CALIBRE.md
index 9e27bfda2..b88d209ff 100644
--- a/calibre/agent-harness/CALIBRE.md
+++ b/calibre/agent-harness/CALIBRE.md
@@ -12,7 +12,7 @@ All heavy lifting is done by the **actual Calibre binaries**:
| Task | Tool | Command Pattern |
|------|------|----------------|
-| Library operations | `calibredb` | `calibredb <cmd> --library-path <lib>` |
+| Library operations | `calibredb` | `calibredb --with-library <lib> <cmd>` |
| Format conversion | `ebook-convert` | `ebook-convert input.epub output.mobi` |
| File metadata | `ebook-meta` | `ebook-meta book.epub --field value` |
diff --git a/calibre/agent-harness/cli_anything/calibre/tests/TEST.md b/calibre/agent-harness/cli_anything/calibre/tests/TEST.md
index b70f08838..8487e4425 100644
--- a/calibre/agent-harness/cli_anything/calibre/tests/TEST.md
+++ b/calibre/agent-harness/cli_anything/calibre/tests/TEST.md
@@ -13,7 +13,7 @@ wrapping the real Calibre tools (`calibredb`, `ebook-convert`, `ebook-meta`).
| File | Tests Planned | Description |
|------|--------------|-------------|
-| `test_core.py` | 30 | Unit tests: synthetic data, no external deps, no Calibre needed |
+| `test_core.py` | 38 | Unit tests: synthetic data, no external deps, no Calibre needed |
| `test_full_e2e.py` | 20 | E2E tests: real Calibre library operations + subprocess CLI tests |
---
@@ -42,7 +42,7 @@ wrapping the real Calibre tools (`calibredb`, `ebook-convert`, `ebook-meta`).
| `test_parse_opf_bad_xml` | Handles malformed XML without crashing |
| `test_settable_fields_set` | SETTABLE_FIELDS contains all expected fields |
| `test_parse_opf_multiple_authors` | Multiple dc:creator elements parsed as list |
-| `test_parse_opf_no_namespace` | Handles OPF without explicit namespace declarations |
+| `test_parse_opf_no_tags` | Handles OPF without dc:subject/tag elements |
### `core/custom.py` — 5 tests
diff --git a/calibre/agent-harness/cli_anything/calibre/tests/test_full_e2e.py b/calibre/agent-harness/cli_anything/calibre/tests/test_full_e2e.py
index 9afde7f04..5102c0c90 100644
--- a/calibre/agent-harness/cli_anything/calibre/tests/test_full_e2e.py
+++ b/calibre/agent-harness/cli_anything/calibre/tests/test_full_e2e.py
@@ -141,10 +141,9 @@ class CalibreTestMixin:
def setUpClass(cls):
calibredb = shutil.which("calibredb")
if not calibredb:
- raise RuntimeError(
- "calibredb not found in PATH.\n"
- "Calibre is a hard dependency — install it:\n"
- " sudo apt-get install calibre"
+ raise unittest.SkipTest(
+ "calibredb not found in PATH. Install Calibre to run E2E tests "
+ "(e.g. `sudo apt-get install calibre`)."
)
cls.tmp_root = tempfile.mkdtemp(prefix="cli-anything-calibre-test-")
@@ -394,7 +393,7 @@ class TestCLISubprocess(unittest.TestCase):
def setUpClass(cls):
calibredb = shutil.which("calibredb")
if not calibredb:
- raise RuntimeError(
+ raise unittest.SkipTest(
"calibredb not found. Calibre is required for E2E tests."
)
cls.tmp = tempfile.mkdtemp(prefix="cli-anything-calibre-subprocess-")
diff --git a/calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py b/calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py
index fc07bce2e..4a74a1469 100644
--- a/calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py
+++ b/calibre/agent-harness/cli_anything/calibre/utils/calibre_backend.py
@@ -82,7 +82,7 @@ def run_calibredb(
timeout: int = 120,
) -> dict[str, Any]:
"""
- Run calibredb with the given args and optional --library-path.
+ Run calibredb with the given args and optional --with-library.
Returns dict with stdout, stderr, returncode.
Raises RuntimeError on non-zero exit.