[INFRA] Transpose the entity table and link to text anchors describing each entity#272
Conversation
|
I am not sure that the transposed format of the entity table looks better, see here:
Any opinions? cc @choldgraf @effigies @franklin-feingold |
|
FWIW |
I absolutely agree ... I spent some minutes trying to find something: No luck so far. But I take your comment as a vote that
would be an improvement. |
|
@yarikoptic it seems like we'd have to write custom CSS to get the sticky first row and column, see: squidfunk/mkdocs-material#1171 |
|
Thanks! Sticky header seems indeed simple https://codepen.io/tfzvang/pen/WQBwVo With transposition it will make it easy to align desired to of the file to the key-value pairs |
|
seems good to me! |
|
Thank you @sappelhoff ! +1 the transposed is looking good and as Yarik said I think it makes it easier to relate and map onto the filenames. Linking from the modality in the entity table to where it is described in the text should help connect the two. Linking to the modality will bring the user to the section they are interested in, perhaps not needing to go into each key (e.g. acq) As you mentioned Stefan - we don't explicitly define the key-value pairs. The closest is in the context of describing the json file format (https://bids-specification.readthedocs.io/en/latest/02-common-principles.html#keyvalue-files-dictionaries). The common principles section would be the best location. Perhaps right around the section I linked? What do we think? |
|
I agree with @franklin-feingold and I have prepared a draft with a short intro.
A new round of reviews would be appreciated. I think this is an acceptable improvement |
yarikoptic
left a comment
There was a problem hiding this comment.
minor comment on sub-label
but I wonder -- so there is no any kind of ids for the modalities in the table -- it doesn't work at all?
effigies
left a comment
There was a problem hiding this comment.
Some consistency and language comments. Additionally, we need to modify the table CSS, because this is very difficult to read with the word wraps in the format strings.
Additionally, column headers are expected to apply to columns, not rows, so we may want to reconsider what's in the top left.
Another thought I had is that we may want to make this into a couple tables, possible an MR/PET and an Electrophys table, and drop entities that don't sensibly apply (such as dir- for ephys). I think this might improve readability a lot.
|
|
||
| <sup>4</sup>[http://fsl.fmrib.ox.ac.uk/fsl/fsl4.0/fdt/fdt_dtifit.html](http://fsl.fmrib.ox.ac.uk/fsl/fsl4.0/fdt/fdt_dtifit.html) | ||
| are in the [FSL format](http://fsl.fmrib.ox.ac.uk/fsl/fsl4.0/fdt/fdt_dtifit.html): | ||
| The bvec files contain 3 rows with n space-delimited floating-point numbers |
There was a problem hiding this comment.
As an aside, this is a good example of why I suggested that we add newlines after sentences, as I now need to read every line to verify that the only change is in the link.
I'll open an issue to restart discussion there.
There was a problem hiding this comment.
Yes, that is a good point, perhaps we can even enforce this with our linter 🤔
There was a problem hiding this comment.
There was a problem hiding this comment.
Cool, thanks. I have a draft I'm working on, but this is surprisingly hard to write in a way that makes it sound like a useful suggestion rather than an annoying one...
src/02-common-principles.md
Outdated
|
|
||
| ## File names consist of key-value pairs (entities) | ||
|
|
||
| We define file names with a chain of key-value pairs, each of which we call |
There was a problem hiding this comment.
The "We" and "you" that show up a bit here feel off relative to most of the document. I think we generally use the passive voice or imperative mood. If it would be useful to have a native English speaker do a sweep through to uniformize the voice, I can do that.
| | meg<br> | REQUIRED | OPTIONAL | REQUIRED | OPTIONAL | | | | OPTIONAL | | | | OPTIONAL | | | ||
| | eeg<br> | REQUIRED | OPTIONAL | REQUIRED | OPTIONAL | | | | OPTIONAL | | | | | | | ||
| | ieeg<br> | REQUIRED | OPTIONAL | REQUIRED | OPTIONAL | | | | OPTIONAL | | | | | | | ||
| | channels<br>(meg/eeg/ieeg) | REQUIRED | OPTIONAL | REQUIRED | | | | | OPTIONAL | | | | | | |
There was a problem hiding this comment.
From here down, the format has switched from DATATYPE (SUFFIX1 SUFFIX2 SUFFIX3) to SUFFIX (DATATYPE1 ...). I recognize that it was there before, so whether we want to fix it here or push it to another PR, I'm okay either way).
There was a problem hiding this comment.
there are more extensive changes to be done (also table Css, potentially splitting per modality, ...), so let's keep the PRs short and focused - that keeps motivation up and improvements flowing in regularly
@yarikoptic Could you reword this? I don't understand what you're trying to say. |
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
effigies
left a comment
There was a problem hiding this comment.
Two very small cleanups, and then I'm good with this.
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
cool thanks. Then once this is merged, I'll open a new issue to track the next enhancements:
I would keep all of these separate issues, because that makes them more attractive to tackle. WDYT? Finally, @effigies could you open an issue related to "each sentence on its own line" (see: #272 (comment)), please? |
|
I think we can merge this. @yarikoptic's concerns will be addressed in a future PR (I'll open an issue upon merge of this PR). @franklin-feingold ... perhaps you want to give it one more review pass? |
franklin-feingold
left a comment
There was a problem hiding this comment.
thank you @sappelhoff ! Looks good!
|
@yarikoptic Any remaining qualms? |
* origin/master: [DOC] Auto-generate changelog entry for PR bids-standard#272 Apply suggestions from code review reorder sections as chris suggested STY: Move to passive voice/imperative mood consistent use of <label> Apply suggestions from code review right align cells and formtting add general section on entities fix linter some cleanup/clarifying try links via tiny headings try fix links try links transpose entity table
closes #200
linking will probably work via html codehtml code is ignored during the renderingI can link to any word using this syntax:<a id="myID">this is my anchor</a>... and then I need to refer to that anchor with this syntax:<a href="#myID">this is my link</a>see example in pure html--> linking does not work as easily as expected with the strikethrough html code I proposed above. Perhaps trying to go the "expected" way and link to headings is easier. We could make a low-in-the-hierarchy heading for each entity once it's being introduced in text.
EDIT: The situation is a bit more complicated than I anticipated. For the first time in quite a while, I read the specification consecutively, and it turns out that the
key-valuepairs (likesub-<label>)are never introduced explicitly or in their own section. They are fed to the reader bit by bit and it is assumed that understanding of the key-value pairs somehow "emerges".Without a central place describing the key-value-pairs (or "entities" as we also seem to call them), it will become hard to link to specific "entities". For example, the
acqparameter is mentioned several times ... and takes on a special meaning depending on the modality.Suggestion
I think we could
Example for point 2.
aqcaqcin Anatomy Imaging Dataacqin Task Imaging Dataacqin ...... and in the entity table, we would link from an entity to the list of items (as shown in the example)