#1176 - Drop CasDumpWriter#1627
Merged
Merged
Conversation
- Replace CasDumpWriter with CasToComparableTextWriter in CasFilter_ImplBaseTest, rewrite line-index assertions to be format-agnostic, drop stale imports - Replace CasDumpWriter with CasToComparableTextWriter in ApplyChangesBackmapperTest and regenerate output.txt reference - Replace CasDumpWriter with CasToComparableTextWriter in HtmlReaderTest - Replace CasDumpWriter with CasToComparableTextWriter in PdfReaderTest, regenerate test.dump reference, drop V2_PRETTY_PRINT setup - Default CasToComparableTextWriter to excluding documentUri/collectionId/documentBaseUri features so reference fixtures stay machine-independent
52fcfbd to
fca45cd
Compare
There was a problem hiding this comment.
Pull request overview
This PR removes the custom CasDumpWriter from dkpro-core-testing-asl and migrates tests/fixtures to use CasToComparableTextWriter (CSV/HTML comparable-text output), including updating defaults to keep reference outputs machine-independent.
Changes:
- Replaced
CasDumpWriterusages in tests andIOTestRunnerwithCasToComparableTextWriter. - Updated
CasToComparableTextWriterdefaults to excludeDocumentMetaDataURI-related features to avoid machine-specific fixture diffs. - Regenerated multiple
.dump/ output reference fixtures to the comparable-text CSV format and removed now-unneededuima.v2_pretty_print_formatwiring.
Reviewed changes
Copilot reviewed 23 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| dkpro-core-textnormalizer-asl/src/test/java/org/dkpro/core/textnormalizer/casfilter/CasFilter_ImplBaseTest.java | Switches test dumping from CasDumpWriter to CasToComparableTextWriter and loosens assertions to be format-agnostic. |
| dkpro-core-testing-asl/src/main/java/org/dkpro/core/testing/IOTestRunner.java | Uses CasToComparableTextWriter for dump generation in one-way tests. |
| dkpro-core-testing-asl/src/main/java/org/dkpro/core/testing/dumper/CasToComparableTextWriter.java | Introduces default feature exclusions for URI-like metadata fields to stabilize fixtures. |
| dkpro-core-testing-asl/src/main/java/org/dkpro/core/testing/dumper/CasDumpWriter.java | Deletes obsolete writer implementation. |
| dkpro-core-testing-asl/NOTICE.txt | Removes CasDumpWriter attribution and keeps comparable-text attribution. |
| dkpro-core-parent-common/pom.xml | Removes global uima.v2_pretty_print_format surefire property. |
| dkpro-core-io-xces-asl/src/test/resources/xces-complex.xml.dump | Regenerated fixture in comparable-text CSV format. |
| dkpro-core-io-xces-asl/src/test/resources/xces-basic.xml.dump | Regenerated fixture in comparable-text CSV format. |
| dkpro-core-io-tiger-asl/src/test/resources/tiger-sample.xml.dump | Regenerated fixture in comparable-text CSV format. |
| dkpro-core-io-tiger-asl/src/test/java/org/dkpro/core/io/tiger/TigerXmlWriterTest.java | Removes V2 pretty-print setup that was only needed for CasDumpWriter. |
| dkpro-core-io-tiger-asl/src/test/java/org/dkpro/core/io/tiger/TigerXmlReaderTest.java | Removes V2 pretty-print setup that was only needed for CasDumpWriter. |
| dkpro-core-io-tei-asl/src/test/java/org/dkpro/core/io/tei/TeiWriterTest.java | Drops stale commented-out CasDumpWriter usage. |
| dkpro-core-io-pdf-asl/src/test/resources/reference/test.dump | Regenerated fixture in comparable-text CSV format. |
| dkpro-core-io-pdf-asl/src/test/java/org/dkpro/core/io/pdf/PdfReaderTest.java | Uses CasToComparableTextWriter and compares against regenerated reference dump. |
| dkpro-core-io-negra-asl/src/test/resources/tueba-sample.export.dump | Regenerated fixture in comparable-text CSV format. |
| dkpro-core-io-negra-asl/src/test/resources/sentence.export.dump | Regenerated fixture in comparable-text CSV format. |
| dkpro-core-io-negra-asl/src/test/resources/format4-with-coref-sample.export.dump | Regenerated fixture in comparable-text CSV format. |
| dkpro-core-io-html-asl/src/test/resources/html/test.html.dump | Regenerated fixture in comparable-text CSV format. |
| dkpro-core-io-html-asl/src/test/java/org/dkpro/core/io/html/HtmlReaderTest.java | Uses CasToComparableTextWriter and removes V2 pretty-print setup. |
| dkpro-core-io-html-asl/src/test/java/org/dkpro/core/io/html/HtmlDocumentReaderTest.java | Removes V2 pretty-print setup that was only needed for CasDumpWriter. |
| dkpro-core-io-conll-asl/src/test/resources/conll/2002/germeval2014_test.conll.out | Regenerated fixture in comparable-text CSV format. |
| dkpro-core-castransformation-asl/src/test/resources/output.txt | Regenerated expected dump output in comparable-text CSV format. |
| dkpro-core-castransformation-asl/src/test/java/org/dkpro/core/castransformation/ApplyChangesBackmapperTest.java | Uses CasToComparableTextWriter and compares against regenerated output.txt. |
Comments suppressed due to low confidence (1)
dkpro-core-textnormalizer-asl/src/test/java/org/dkpro/core/textnormalizer/casfilter/CasFilter_ImplBaseTest.java:90
- This uses FileUtils.readFileToString(File) without specifying an explicit charset. Since the same test class also reads using a fixed UTF-8 charset, it would be more robust/consistent to always read the dump using UTF-8 (or StandardCharsets.UTF_8) to avoid platform-default differences.
.createAggregateBuilderDescription(filter, writer);
SimplePipeline.runPipeline(reader, annotator, aggregator);
assertTrue(FileUtils.readFileToString(tmpFile).isEmpty());
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fca45cd to
fdaa583
Compare
- Switch IOTestRunner to use CasToComparableTextWriter instead of CasDumpWriter - Regenerate .dump reference fixtures in CSV format (bnc, html, negra ×4, tiger ×2, xces ×2) - Drop V2_PRETTY_PRINT @BeforeAll setup from HtmlReaderTest, HtmlDocumentReaderTest, TigerXmlReaderTest, TigerXmlWriterTest (no longer needed without CasDumpWriter) - Drop uima.v2_pretty_print_format surefire system property from dkpro-core-parent-common - Delete obsolete CasDumpWriter and clean up TeiWriterTest stale comment - Update NOTICE.txt to drop CasDumpWriter attribution
fdaa583 to
afa3346
Compare
- Make CasToComparableTextWriter iterate all CAS views with per-view section headers so multi-view CASes (e.g. backmapper output) are dumped completely instead of only the current view - Regenerate ApplyChangesBackmapperTest output.txt reference to cover both _InitialView (backmapped) and TargetView sections - Tighten CasFilter_ImplBaseTest assertions to check the fully-qualified Sentence type header and exact anchor prefix instead of loose substring matches - Refresh RTFReaderTest Javadoc to reference CasToComparableTextWriter instead of CASDumpWriter
- Throw `AnalysisEngineProcessException` when a view pattern is missing the include/exclude prefix - Extract per-view rendering into a private `renderView` helper - Add tests covering single-view header omission, multi-view headers, default URI feature exclusions, view include/exclude patterns, and custom exclusion overrides
a291e6f to
ae903af
Compare
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.
What's in the PR
How to test manually
Automatic testing
Documentation