Report what a path holds by opening the files in it - #75
Merged
Conversation
beetlebugorg
force-pushed
the
feat/inventory
branch
from
September 6, 2026 23:11
627c73b to
d38a909
Compare
A host importing charts had to decide from a file name what it could hand over, and every host that did so rejected charts this engine reads. S-101 names are longer than S-57 names, and the S-164 test sets put digits and an underscore where a producer code was assumed. tile57_inventory_open looks through one file or a directory and reports a row per file that looks like a chart. Two steps, and only the first reads a name: an extension shortlists the files to open, then the file states what it is, through the leading-record peek that already reads a dataset's standard, name, edition and scale. A shortlisted file that turns out to be something else is TILE57_FILE_OTHER with a reason. CATALOG.031 reports that way. src/chart.zig is registered for tests. No test step collected it: the engine imports it as a module, and a module import does not pull another module's test blocks in, so its four tests had never run.
beetlebugorg
force-pushed
the
feat/inventory
branch
from
September 6, 2026 23:25
d38a909 to
7936c60
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.
A host importing charts had to decide from a file name what it could hand over, and every host that did so rejected charts this engine reads. S-101 names are longer than S-57 names, and the S-164 test sets put digits and an underscore where a producer code was assumed.
tile57_inventory_openlooks through one file or a directory and reports a row per file that looks like a chart: kind, standard, cell name, edition, scale, coverage, bytes, and a reason for one it cannot open. Two steps, and only the first reads a name. An extension shortlists the files to open (.000 through .999, .pmtiles, .mbtiles, .kap, .bsb), then the file states what it is, throughpeekAnyInfofor a dataset,openPmtilesPathfor a baked archive andRasterChart.openfor a picture chart. A shortlisted file that turns out to be something else isTILE57_FILE_OTHERwith a reason. CATALOG.031 reports that way.An exchange set still in its .zip is out of scope here, because reading an entry means inflating it and the listing alone cannot say what an entry holds.
src/chart.zigis registered for tests. No test step collected it: the engine imports it as a module, and a module import does not pull another module's test blocks in, so its four tests had never run. They pass.Checks
zig build,zig build test(433 tests) andzig fmt --checkpass.Over the test data on this machine, with
T57_INV_DIRnaming each folder: the S-101 1.2 set inventories to 32 source rows, standard s101, with names and scales from the datasets;S-164/TestDataSets/2.2.5 Good Base Cellsto one source row,10100AA_X01SW, scale 22000;S-164/LogsDumps, holding 72 xml and 45 log files, to no rows; a folder of S-57 cells to three source rows with their scales; a folder holding one baked archive to one baked row, scale 12000.Each new test was made to fail once, to check the suite names it.