Skip to content

Skip exchange set catalogues and plain comments in the AML corpus test (#42) - #54

Merged
philliphoff merged 1 commit into
mainfrom
aml-real-data-fixes
Nov 3, 2026
Merged

philliphoff merged 1 commit into
mainfrom
aml-real-data-fixes

Conversation

@philliphoff

Copy link
Copy Markdown
Owner

Summary

Runs the local-only AML real-data test (AmlDataSetCorpusTests) for #42 and fixes the two problems it found. Both were in the test, not the library.

The real-data test passes on all 82 unique cells of the public AML sample and test data: the 76 cells #42 describes (UKHO AML 1.0 base, update and representative sets and the Bundeswehr AML 3.0 trials data) plus the 6 cells of the AML 2.1 base exchange set. That's 281,045 feature records and 835,069 attribute values. Every OBJL and ATTL resolves in its catalogue (AML 1.0, 2.1 or 3.0), every cell is detected as AML, and every cell builds an S57Chart. The 3 update cells also build on their own, so no update-chaining change was needed.

Fixes:

  • CATALOG.031 was read as a cell. Its extension matches the .000–.999 pattern. The test now skips exchange set catalogues, so it can run straight on unzipped exchange sets (114 files, including duplicates across sets, pass that way too).
  • The COMT check was too strict. The published cells all carry key=value AML metadata in DSID COMT. But copies of the 4 AML 3.0 trials cells in the IHO S-64 test data carry a plain producer comment instead. That's valid S-57 free text, and AmlDataSetMetadata is right to return no metadata, which AmlDataSetTests.UnstructuredComment_HasNoMetadata already covers. The check now fails only when a comment written as key=value pairs doesn't parse. With the old strict check, all 82 published cells still pass.

No library code changed, so there's no new synthetic test. The library behaviour behind the COMT finding is already covered.

Standards alignment

  • S-57 records, topology, updates or exchange sets (s57-enc)

Standard section references cited in code or docs: none

Tests

  • Added or updated xUnit tests under tests/
  • Test input is built in memory; no real ENC cells are committed
  • dotnet test --configuration Release passes locally. The unit tests pass (1091 passed, 1 skipped) and dotnet format --verify-no-changes is clean. The three retained-memory budgets in EncDotNet.PerformanceTests fail on my macOS arm64 machine, at about 2× budget, deterministically. That's unrelated to this change, which only touches the unit-test project. The budgets are calibrated on CI's ubuntu x64 runners, and main's CI passes them.

Documentation

  • N/A

Dependencies

  • No new NuGet dependencies

Breaking changes

None.

Refs #42

🤖 Generated with Claude Code

#42)

The local-only AML corpus test read CATALOG.031 as a cell, because its
extension looks like one, and required every non-empty DSID COMT to parse
as AML metadata. COMT is free text in S-57: the published AML cells write
key=value metadata there, but copies of the AML 3.0 trials cells in the
S-64 test data carry a plain comment instead. The test now skips exchange
set catalogues and only requires a comment written as key=value pairs to
parse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@philliphoff
philliphoff merged commit 8d733de into main Nov 3, 2026
11 checks passed
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