Repository navigation
fix(examples): the corpus tools match the .dwg extension in any case (#345) - #353
Merged
Merged
Conversation
…345) coverage_report, probe_data_page_header, probe_acis_records, dwg-corpus and probe_material tested the extension as the lower-case string "dwg". A drawing named X.DWG, which is how AutoCAD-era files are often named, was skipped without a word: coverage_report listed one file of two and exited 0, and probe_data_page_header, finding no file, read ../../samples instead and reported on ten other drawings. The other corpus tools already compare with eq_ignore_ascii_case.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
coverage_report,probe_data_page_header,probe_acis_records,dwg-corpusandprobe_materialtested the file extension against the lower-case stringdwg, so a drawing namedX.DWGwas skipped without a word. They now compare witheq_ignore_ascii_case, asdxf_oracle,probe_header_vars,probe_r2007_rs,probe_dxf_headerandsupport/twin.rsalready do. Found while pinning AutoCAD-written R13 drawings (#345), 26 of whose 122 files end in.DWG:coverage_reportmeasured 222,143 of their records instead of 345,000.Spec reference
None: corpus tooling, no decoder changes.
Evidence
A directory holding
arc_2000.dwgand a.DWGcopy ofline_2000.dwg(both from the pinned nextgis set), run with a build of this PR's parent and of this PR:coverage_report DIRdwg-corpus DIRprobe_acis_records DIR0 ACIS record(s) across 1 file(s)... across 2 file(s)probe_data_page_header --strict DIR, withDIRholding onlyARC_2004.DWG(a copy of nextgisarc_2004.dwg): before, it found no file and fell back to../../samples, printing10 drawings, 186 data pages(ten other drawings, exit 0); after,1 drawings, 16 data pages, the drawing it was given.Every drawing in the pinned corpus today ends in lower-case
.dwg, sotools/corpus/measure.py checkis unaffected by this PR; it matters for the next pins.Reproduce:
Test plan
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featuresSource-provenance declaration
By submitting this PR I certify that my contribution does not incorporate executable code from any source whose license is incompatible with Apache-2.0. Specifically:
CLEANROOM.md).My contribution is a one-line change to five filters in the crate's own tools; no outside source was consulted.
Developer Certificate of Origin
I affirm that the contribution complies with the Developer Certificate of Origin 1.1.