edfcore 0.4.385 → 0.4.387
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/cli.js +0 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/docs/CHANGELOG.md +37 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ for (const event of annotations) {
|
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
> **Status: 0.4.x, early.** edfcore runs
|
|
81
|
+
> **Status: 0.4.x, early.** edfcore runs 2,000+ tests on generated fixtures, and it's checked
|
|
82
82
|
> against public corpora it didn't author: the EDF, EDF+ and 24-bit BDF+ test files from
|
|
83
83
|
> teuniz.net, and PhysioNet's sleep-edfx (a real 22-hour polysomnography recording and its
|
|
84
84
|
> sleep-staging file). Those checks are numeric. Channels labelled `sine 8.5 Hz` decode to
|
package/dist/cli.js
CHANGED
|
File without changes
|
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.4.
|
|
112
|
+
export declare const VERSION = "0.4.387";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,43 @@ 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.4.387
|
|
10
|
+
|
|
11
|
+
- **Added** a check that the published `bin` runs as a program. `cli.test.ts` and the rest drive
|
|
12
|
+
`runCli` through an injected `CliIo`, deliberately, so they need no build; `cli-pipe.test.ts`
|
|
13
|
+
spawns the built file but always as `node dist/cli.js`, naming the interpreter itself. Between
|
|
14
|
+
them they covered every line of the program and none of the mechanism that starts it.
|
|
15
|
+
- Delete the `#!/usr/bin/env node` from `src/cli.ts` and every test here still passes: the build
|
|
16
|
+
succeeds, `verify:tarball` finds the bin target in the tarball, and `node dist/cli.js header
|
|
17
|
+
f.edf` works exactly as before. `npx edfcore header f.edf` — the first command the README prints
|
|
18
|
+
— fails on the first line of JavaScript, because the shell it was handed to is not a JavaScript
|
|
19
|
+
engine.
|
|
20
|
+
- So the built file is given the executable bit npm's tarball carries for a bin and run with no
|
|
21
|
+
interpreter named, which is the only way to check the shebang rather than the file's first line:
|
|
22
|
+
a CRLF ending, a leading blank line or a BOM each leave the text intact and the program
|
|
23
|
+
unloadable.
|
|
24
|
+
- Both spawns close stdin and carry a timeout, because that failure does not look like an error. A
|
|
25
|
+
file with no shebang is handed to `/bin/sh`, which reads JavaScript as shell and sits waiting for
|
|
26
|
+
input — without the timeout a deleted shebang hangs the suite instead of failing it.
|
|
27
|
+
|
|
28
|
+
## 0.4.386
|
|
29
|
+
|
|
30
|
+
- **Added** a property test for the window rule annotations are filtered by: overlap rather than
|
|
31
|
+
containment for an event with a duration, and half-open containment of the onset for an instant,
|
|
32
|
+
so adjacent windows partition a recording without double-counting the boundary.
|
|
33
|
+
- `tests/unit/annotations-query.test.ts` checks that with hand-placed events at hand-picked
|
|
34
|
+
boundaries and is thorough about the cases someone thought of — the instant at t = 0, the epoch
|
|
35
|
+
ending exactly where the window starts, the duration a writer spelled `0` rather than omitting.
|
|
36
|
+
What no example can say is that the rule holds for a partition it was not written against.
|
|
37
|
+
- So the events are generated, written into a real EDF+ file and read back through the parser
|
|
38
|
+
before anything is filtered. The comparison is on `onsetTicksFromFirstRecord`, and those ticks
|
|
39
|
+
are parsed digit by digit out of the TAL: an oracle fed hand-built objects would agree with the
|
|
40
|
+
filter about numbers no file ever produced.
|
|
41
|
+
- Three properties over that: every instantaneous event gets exactly one window of a partition,
|
|
42
|
+
an event with a duration gets every window it overlaps and no other, and the result matches an
|
|
43
|
+
independent case analysis in ticks. Changing `onset >= from` to `onset > from` in the filter —
|
|
44
|
+
one character — fails the first two with a shrunk counterexample.
|
|
45
|
+
|
|
9
46
|
## 0.4.385
|
|
10
47
|
|
|
11
48
|
- **Added** a check that the file the inspector hands a first-time visitor is one edfcore accepts.
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED