Skip to content

Conversation

@LonelyMidoriya
Copy link
Contributor

@LonelyMidoriya LonelyMidoriya commented Nov 18, 2025

Summary by CodeRabbit

  • Tests
    • Improved test data filtering to ensure entries are correctly organized by corpus type, enhancing test execution accuracy and data management.

@coderabbitai
Copy link

coderabbitai bot commented Nov 18, 2025

Walkthrough

Adds conditional filtering to ZipBackedTestCorpus to exclude or include ZIP entries based on corpus type: skips entries containing "Isartor" for VERA type corpuses and skips entries not containing "Isartor" for ISARTOR type corpuses.

Changes

Cohort / File(s) Summary
ZIP Entry Filtering Logic
veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/ZipBackedTestCorpus.java
Adds two entry filtering conditions prior to existing type-based branching: skip entries with "Isartor" in name for VERA corpus type, and skip entries without "Isartor" for ISARTOR corpus type.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify filtering logic correctly distinguishes between VERA and ISARTOR corpus types
  • Confirm "Isartor" string matching is appropriate and not too broad or restrictive

Poem

🐰 In the corpus where test entries hide,
We filter with care, with logic as guide,
Skip Isartor here, keep it there,
Each entry finds its proper lair! 📋✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix Isartor corpus double testing' directly relates to the main change, which adds filtering logic to prevent double testing of Isartor entries in different corpus types.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch isartor-double-testing

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/ZipBackedTestCorpus.java (1)

106-111: Isartor/Vera filtering logic is sound; consider de-duplicating the "Isartor" check

The early-continue checks correctly:

  • Exclude Isartor entries from the VERA corpus.
  • Restrict the ISARTOR corpus to only Isartor entries.

This should resolve the double-testing issue without affecting TWG/BFO or flavour-based behaviour, since the subsequent type/flavour branching remains unchanged.

As a minor cleanup, you could avoid the repeated magic string and duplicate contains calls:

-                if (type == Corpus.VERA && entryName.contains("Isartor")) {
-                    continue;
-                }
-                if (type == Corpus.ISARTOR && !entryName.contains("Isartor")) {
-                    continue;
-                }
+                final String ISARTOR_TAG = "Isartor";
+                boolean isIsartorEntry = entryName.contains(ISARTOR_TAG);
+                if ((type == Corpus.VERA && isIsartorEntry)
+                        || (type == Corpus.ISARTOR && !isIsartorEntry)) {
+                    continue;
+                }

(Or move ISARTOR_TAG to a class-level constant if you prefer.)

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e63d07 and 6fdd688.

📒 Files selected for processing (1)
  • veraPDF-integration/src/main/java/org/verapdf/pdfa/qa/ZipBackedTestCorpus.java (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Checkout and Build (25)
  • GitHub Check: Checkout and Build (17)
  • GitHub Check: Checkout and Build (21)
  • GitHub Check: Checkout and Build (11)
  • GitHub Check: Checkout and Build (8)

@MaximPlusov MaximPlusov merged commit ad06cdb into integration Nov 18, 2025
7 checks passed
@MaximPlusov MaximPlusov deleted the isartor-double-testing branch December 3, 2025 21:35
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.

3 participants