Repository navigation
Correct the eegprep-lean tier table and where channel units live - #1468
Merged
Merged
Conversation
ADR 0069's tier table puts zarr in eegprep-lean's base, at 12 packages and
4.2 MB. The implementation cannot follow it. zarr installs under Pyodide
only with deps=False, because its numcodecs>=0.14 pin is metadata and
numcodecs publishes no emscripten wheel at any version, so a base that
declared zarr would make micropip.install("eegprep-lean") fail outright
in the browser the distribution exists for.
The ADR gets a correction note in the style of the one already there for
the [ica] tier. The contract doc, which is what a reader of eegprep-lean
consults, gets the table corrected in place. ADR 0069's measurements are
unchanged; only the install names they sit under were wrong.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR1468Version: 🤖 Updated on each push. |
The unit is an attribute of the channel group, not of the level-0 array, which carries scale, offset and physical_formula but not the unit they produce. A reader that inspects only the array concludes units are unknowable; eegprep-lean did, and shipped that claim. The same document carries original_rate, which does not always equal rate, because the store caps level 0 at 250 Hz for EEG and MEG. Both need no zarr and no numpy to read, so they belong to the base tier, which the tier table understated. Also corrects the preprocess row: ADR 0069 measured the tiers cumulatively, so 30.4 MB was measured with matplotlib present and the row now names plot as well.
This branch was previously deployed
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.
Two corrections to what
eegprep-lean's tiers are and what its base tier can answer. Both were found while building the plot tier in sccn/eegprep#409.zarr is an extra, not a base dependency
ADR 0069's table puts zarr in the base, at 12 packages and 4.2 MB, described as "read a window of data". The implementation cannot follow it.
zarr installs under Pyodide only as
micropip.install("zarr==3.4.0", deps=False). Itsnumcodecs>=0.14pin is metadata, and numcodecs publishes no emscripten wheel at any version, so a normal resolve fails on a dependency these stores never touch at runtime. A base tier that declared zarr would makemicropip.install("eegprep-lean")fail outright in the browser the distribution exists for.So the tier ADR 0069 measured at 12 packages and 4.2 MB is
[zarr], and the base beneath it is the package alone.ADR 0069's measurements are unchanged. What was wrong is the install name each row sits under.
The base tier answers more than the table implied
The unit each channel is measured in, and the channel's own label, are attributes of the channel group, not of the level-0 array. The array carries
scale,offsetandphysical_formulabut not the unit those produce, so a reader inspecting only the array concludes units are unknowable.eegprep-leandid exactly that and shipped the claim;nm000103names its channelsE1throughE129and declares them inuV.The same document carries
original_rate, which does not always equalrate: the store resamples level 0 tomin(native rate, modality cap), and the cap for EEG and MEG is 250 Hz, sonm000103was acquired at 500 Hz and is served at 250. A client reporting onlyratelets a caller believe they hold the recording as acquired.Reading that document needs no zarr and no numpy, so it belongs to the base tier.
The preprocess row was measured with matplotlib present
ADR 0069 measured the tiers cumulatively, so the 30.4 MB figure includes matplotlib's 9.8 MB. The row is now
[zarr,plot,preprocess], and the table says[zarr,preprocess]alone has not been measured. The package count corroborates this: 22 to 23 is one new package going from[zarr,plot], which only works if scipy's sole new dependency, numpy, was already satisfied by matplotlib.How each document is treated
[ica]tier, rather than an edited table. Never delete, supersede or annotate..context/eegprep_lean_contract.mdis a design doc, not an ADR, and it is what a reader ofeegprep-leanconsults, so its table is corrected in place and a section on what the base tier can answer is added.[zarr]tier's package list.bun test ./test/adr-index.unit.test.tspasses: 8 tests.