@wafertools/testdata-parser 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/package.json +1 -1
- package/testdata_parser.d.ts +6 -0
- package/testdata_parser_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -116,8 +116,10 @@ interface CsvMapping {
|
|
|
116
116
|
testnameCol?: string; // for "tall" CSVs: column holding the test name per row
|
|
117
117
|
testnumberCol?: string; // for "tall" CSVs: column holding the test's real number per row
|
|
118
118
|
testvalueCol?: string; // for "tall" CSVs: column holding the test value per row
|
|
119
|
-
loLimitCol?: string;
|
|
119
|
+
loLimitCol?: string; // for "tall" CSVs: test limits (STDF LO_LIMIT/HI_LIMIT) per row
|
|
120
120
|
hiLimitCol?: string;
|
|
121
|
+
loSpecCol?: string; // for "tall" CSVs: spec limits (STDF LO_SPEC/HI_SPEC) per row — a separate pair
|
|
122
|
+
hiSpecCol?: string;
|
|
121
123
|
unitsCol?: string;
|
|
122
124
|
passBins: number[]; // hbin/sbin values treated as a pass for pass/fail summary
|
|
123
125
|
}
|
|
@@ -220,6 +222,7 @@ type ParserWarningCode =
|
|
|
220
222
|
| 'unpositioned-dies' // dies with no X/Y — real data, not placeable
|
|
221
223
|
| 'bin-invalid' // a bin outside STDF's 0–32767, or a missing hard bin
|
|
222
224
|
| 'coordinate-invalid' // an X/Y outside STDF's -32767..32767
|
|
225
|
+
| 'site-invalid' // a site number outside STDF's 0–255 (flat formats)
|
|
223
226
|
| 'result-unusable' // results the tester flagged unusable (value left out, verdict kept)
|
|
224
227
|
| 'records-not-read' // records this parser does not read yet (MPR)
|
|
225
228
|
| 'wafer-end-missing' // a wafer had no WRR; closed at the next wafer or end of file
|
|
@@ -262,7 +265,7 @@ an empty array, which asserts that nothing passes.
|
|
|
262
265
|
**`warnings` carries a stable `code`, prose, and a severity** — branch on the code, display
|
|
263
266
|
the message, and never match on the prose. `severity: 'error'` means a number or a plot
|
|
264
267
|
built from this result can mislead, because data was dropped or a value was substituted
|
|
265
|
-
(`unpositioned-dies`, `bin-invalid`, `coordinate-invalid`, `record-malformed`, `records-not-read`, `values-not-numeric`); `'warning'` means the
|
|
268
|
+
(`unpositioned-dies`, `bin-invalid`, `coordinate-invalid`, `site-invalid`, `record-malformed`, `records-not-read`, `values-not-numeric`); `'warning'` means the
|
|
266
269
|
parse applied a documented rule or interpretation — one you may want to change, or, like
|
|
267
270
|
`result-unusable`, the spec's own rule for leaving out values the tester flagged — and the
|
|
268
271
|
result means what the file says. Nothing here is fatal — the parse succeeded. Surface them: a silently discarded
|
|
@@ -375,6 +378,15 @@ pub struct CsvHeadersResult {
|
|
|
375
378
|
- **Byte readers are panic-free.** STDF/ATDF field readers are bounds-checked and return `Option`/`Result` rather than panicking on truncated input — a panic inside WASM aborts the whole module with no recovery, so this is a hard requirement, not a style preference.
|
|
376
379
|
- **Big-endian and little-endian STDF** are both supported (detected from the FAR record's `CPU_TYPE`).
|
|
377
380
|
- **Gzip is transparent** — every entry point decompresses `.gz` input automatically by sniffing the magic bytes; callers don't need to branch on compression.
|
|
381
|
+
- **MPR records are not read yet.** A multiple-result parametric record (STDF `MPR`, ATDF `MPR:`)
|
|
382
|
+
carries several results for one test; both parsers skip them — in the full parse and the
|
|
383
|
+
test-name scan alike — and count them in a `records-not-read` warning, so the missing tests are
|
|
384
|
+
never silent. PTR and FTR records are read in full.
|
|
385
|
+
- **Every format applies STDF V4's value ranges.** A bin, coordinate or site number STDF cannot
|
|
386
|
+
store, or a test value that is not finite, is missing in CSV, JSON and Parquet exactly as in
|
|
387
|
+
STDF and ATDF, and is reported under the same codes (`bin-invalid`, `coordinate-invalid`,
|
|
388
|
+
`site-invalid`, `result-unusable`). The rule lives in one place (`SpecCheck` in `types.rs`),
|
|
389
|
+
which the flat formats reach through `flat_wafers::into_parsed`.
|
|
378
390
|
- **CSV/JSON/Parquet test numbers fall back to a deterministic hash only when the file itself carries no real one.** Neither format has a *mandatory* STDF-style test number the way STDF/ATDF do, but a real one is used whenever the source data has it — see "Test identity — real number vs. synthesized one" above for the wide/tall rules. Hashing is the fallback, not the default: it fires per test only when no real number was mapped or the mapped column's value didn't parse (`test_identity::stable_test_number`, FNV-1a with a fixed seed and a reserved floor, collision-probed so two tests in one file can never collide, and never colliding with a genuine numeric-header/`testnumberCol` value either). Deliberately not sequential/encounter-order: a hash means the number for a given test doesn't change if the file is reordered or a column is added — a *hashed* number is otherwise meaningless and callers should never rely on its value, only on it being stable and unique within one parse. `order` (see `TestDef` above) carries the file's own display order instead.
|
|
379
391
|
- **Parquet reads through a row-oriented API, not Arrow.** `parquet::record::Row`/`Field` rather than the `arrow` feature — a closer fit for this crate's row-based `DieResult` model, and a smaller WASM bundle (no Arrow array machinery pulled in). A typed Parquet cell is coerced to `f64` for numeric roles and to a plain string otherwise; a value that fails to coerce (e.g. a numeric role mapped to a genuinely string-typed column) is skipped and surfaced as one summarised entry in `warnings`, not a panic or a silent zero.
|
|
380
392
|
- **Parquet's `zstd` codec is native-only.** `snappy`, `gzip`, `lz4`, and `brotli` build for `wasm32-unknown-unknown` with no extra toolchain; `zstd`'s C library needs a real C cross-compiler targeting wasm32, which a plain `wasm-pack build` doesn't assume is available. A `zstd`-compressed Parquet file parses natively but fails clearly on the WASM build.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@wafertools/testdata-parser",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Rust/WASM parsers for semiconductor test data formats (STDF, ATDF, CSV, JSON, Parquet)",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.13.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
package/testdata_parser.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ export type ParserWarningCode =
|
|
|
87
87
|
| "unpositioned-dies"
|
|
88
88
|
| "bin-invalid"
|
|
89
89
|
| "coordinate-invalid"
|
|
90
|
+
| "site-invalid"
|
|
90
91
|
| "result-unusable"
|
|
91
92
|
| "records-not-read"
|
|
92
93
|
| "wafer-end-missing"
|
|
@@ -193,8 +194,13 @@ export interface CsvMapping {
|
|
|
193
194
|
testnumberCol?: string | null;
|
|
194
195
|
/** Tall format: the column holding each row's measured value. */
|
|
195
196
|
testvalueCol?: string | null;
|
|
197
|
+
/** Tall format: the columns holding each test's test limits (STDF LO_LIMIT/HI_LIMIT). */
|
|
196
198
|
loLimitCol?: string | null;
|
|
197
199
|
hiLimitCol?: string | null;
|
|
200
|
+
/** Tall format: the columns holding each test's spec limits (STDF LO_SPEC/HI_SPEC) —
|
|
201
|
+
* a separate pair from the test limits, never mixed with them. */
|
|
202
|
+
loSpecCol?: string | null;
|
|
203
|
+
hiSpecCol?: string | null;
|
|
198
204
|
unitsCol?: string | null;
|
|
199
205
|
/** Bins counted as a pass in this file's own pass/fail summary. */
|
|
200
206
|
passBins: number[];
|
package/testdata_parser_bg.wasm
CHANGED
|
Binary file
|