edfcore 0.5.24 → 0.5.26
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 +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/docs/CHANGELOG.md +51 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
package/README.md
CHANGED
|
@@ -77,7 +77,7 @@ for (const event of annotations) {
|
|
|
77
77
|
}
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
> **Status: 0.5.x, early.** edfcore runs
|
|
80
|
+
> **Status: 0.5.x, early.** edfcore runs 4,000+ tests on generated fixtures, and it's checked
|
|
81
81
|
> against public corpora it didn't author: the EDF, EDF+ and 24-bit BDF+ test files from
|
|
82
82
|
> teuniz.net, and PhysioNet's sleep-edfx (a real 22-hour polysomnography recording and its
|
|
83
83
|
> sleep-staging file). Those checks are numeric. Channels labelled `sine 8.5 Hz` decode to
|
package/dist/constants.d.ts
CHANGED
|
@@ -109,5 +109,5 @@ export declare const SIGNAL_FIELD_BLOCK_OFFSETS: {
|
|
|
109
109
|
readonly reserved: 224;
|
|
110
110
|
};
|
|
111
111
|
/** Published package version. Kept in sync with package.json by a test. */
|
|
112
|
-
export declare const VERSION = "0.5.
|
|
112
|
+
export declare const VERSION = "0.5.26";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,57 @@ alone does not tell you whether you were affected.
|
|
|
6
6
|
edfcore is pre-1.0. Patch releases have carried behaviour changes where the old behaviour was a
|
|
7
7
|
defect; those are called out below.
|
|
8
8
|
|
|
9
|
+
## 0.5.26
|
|
10
|
+
|
|
11
|
+
- **Added** the two sentences that promise nothing changes when you run it again. `validation.md`:
|
|
12
|
+
"It does not modify the recording, the header or the source. `validateRecording` reads and
|
|
13
|
+
returns; call it twice and you get the same report." `diagnostics.md`: the formatter output "is
|
|
14
|
+
deterministic ... so it's safe to snapshot in a test." Both are properties of every read in the
|
|
15
|
+
package rather than of one call, and neither had a test — nothing in the suite called anything
|
|
16
|
+
twice and compared, and nothing checked that a read leaves the header it was given alone.
|
|
17
|
+
- They are easy properties to lose and hard to notice losing. A parse that memoises a derived value
|
|
18
|
+
onto the header it returns, a formatter that sorts its input in place, a scan that fills in
|
|
19
|
+
`segments` on the index it was handed: each is a reasonable-looking optimisation, each makes the
|
|
20
|
+
second call disagree with the first, and none fails anything until a caller compares two runs. The
|
|
21
|
+
failure then looks like a file that changed.
|
|
22
|
+
- So both are swept over the whole shape matrix rather than asserted on one fixture. For each of the
|
|
23
|
+
eight `AWKWARD` files — a zero record duration, no data signal at all, duplicate labels, a signal
|
|
24
|
+
with no usable scale — every read and every formatter runs twice and the results are compared; the
|
|
25
|
+
source's bytes are compared before and after; and the header, timeline and index are compared
|
|
26
|
+
through a walk that handles the `bigint`s and typed arrays `JSON.stringify` refuses.
|
|
27
|
+
- The stronger form goes with it: a second recording opened over a copy of the same bytes must agree
|
|
28
|
+
with the first, so the output is a function of the file rather than merely stable per object. And
|
|
29
|
+
the probed index stays probed — `buildRecordIndex` returns a new one rather than filling in the
|
|
30
|
+
one it was handed.
|
|
31
|
+
|
|
32
|
+
## 0.5.25
|
|
33
|
+
|
|
34
|
+
- **Added** the three option tables on `api-helpers.md` and the defaults they promise. Seven fields
|
|
35
|
+
across `FormatHeaderOptions`, `FormatAnnotationsOptions` and `FormatReportOptions`, each with a
|
|
36
|
+
stated default — the part of an option nobody passes and everybody depends on.
|
|
37
|
+
- One of them had never appeared in a test at all. `diagnosticsHint` defaults to `true` and appends
|
|
38
|
+
"Call formatDiagnostics(header.diagnostics) for the detail" under the counts; `edfcore header`
|
|
39
|
+
turns it off because it is already printing that detail. Both halves — that it is on by default,
|
|
40
|
+
and that turning it off removes exactly that line and leaves the counts it sits under — were
|
|
41
|
+
documented in two places and asserted in none.
|
|
42
|
+
- The page argues about two of them together: "The two defaults point opposite ways on purpose.
|
|
43
|
+
`includePatientId` withholds until asked, because the cost of forgetting is a person's name in an
|
|
44
|
+
issue tracker. `diagnosticsHint` prints until told not to, because the cost of forgetting is one
|
|
45
|
+
redundant line." That is a claim about a pair, so it is asserted as a pair.
|
|
46
|
+
- `FormatReportOptions.maxItems` is checked against the constant in `format-report.ts` rather than
|
|
47
|
+
against a literal, `header` is shown to be the difference between "signal 0" and the label, and
|
|
48
|
+
`redactFields` is exercised on a report that really does quote the identification — the default
|
|
49
|
+
prints "Haagse Harry" in full, and asking replaces it with `[redacted]` while the codes, counts
|
|
50
|
+
and advice survive.
|
|
51
|
+
- The hypnogram transcript above the tables runs with them, since it is the same formatter at its
|
|
52
|
+
defaults: `00:00:00.000 Sleep stage W` and
|
|
53
|
+
`08:30:30.000 00:02:00.000 Sleep stage 1`, compared to the page character for character,
|
|
54
|
+
including the column the missing duration leaves blank.
|
|
55
|
+
- **Changed** the suite-size figure the README, `installation.md` and `browser-safety.test.ts` state
|
|
56
|
+
from 2,700+ to 4,000+. `test-count-claims.test.ts` failed this release rather than after it: it
|
|
57
|
+
compares the written figure against the count the suite actually declares, in the direction that
|
|
58
|
+
rots, and names which page to raise.
|
|
59
|
+
|
|
9
60
|
## 0.5.24
|
|
10
61
|
|
|
11
62
|
- **Added** "the whole flow" at the end of `discontinuous.md`, run, and the diagram at the top of it.
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED