Skip to content

chore: improve pdf-craft maintenance path#367

Open
lphuc2250gma wants to merge 1 commit into
oomol-lab:mainfrom
lphuc2250gma:maint/20260606041541
Open

chore: improve pdf-craft maintenance path#367
lphuc2250gma wants to merge 1 commit into
oomol-lab:mainfrom
lphuc2250gma:maint/20260606041541

Conversation

@lphuc2250gma

Copy link
Copy Markdown

Summary:

  • Add or tighten focused edge-case tests or type assertions in tests/test_parser.py, tests/test_jointer.py related to Python typing, tests, CLI ergonomics, observability; avoid docs-only changes and broad refactors.
  • Keep the change narrow so it is straightforward to review.

Notes:

  • I kept this scoped to the relevant implementation and tests.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Linter diff in the way? Review this PR in Change Stack to focus on meaningful changes and expand context only when needed.

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ed5070d3-36cb-47ff-a516-9b56313502c0

📥 Commits

Reviewing files that changed from the base of the PR and between f463a4e and 2a527e0.

📒 Files selected for processing (2)
  • tests/test_jointer.py
  • tests/test_parser.py

Summary by CodeRabbit

  • Tests
    • Improved test coverage for markdown parsing edge cases
    • Added verification that empty inputs are correctly handled
    • Added tests confirming single-quoted attributes are properly parsed and preserved

Walkthrough

This PR adds and strengthens test coverage for edge cases across two test modules. In tests/test_jointer.py, assertions for the _parse_block_content function are enhanced to verify that both empty-string and None inputs return a list type with appropriate length validation. In tests/test_parser.py, two new test methods are introduced: one verifying that parse_raw_markdown returns an empty list for empty input, and another confirming that HTML attributes enclosed in single quotes are correctly parsed and preserved in the resulting HTMLTag object's attributes dictionary.

Possibly related PRs

  • oomol-lab/pdf-craft#290: Introduces the parse_raw_markdown parser behavior being tested by the new unit tests in this PR.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: improve pdf-craft maintenance path' follows the required format with type and subject, but is vague and does not clearly describe the actual changes (adding/tightening edge-case tests). Clarify the title to better describe the specific changes, such as 'chore(tests): add edge-case tests for parser and jointer' to make the changes more evident.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly relates to the changeset, explaining the addition of focused edge-case tests in the test files mentioned in the pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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