Skip to content

[INFRA] Transpose the entity table and link to text anchors describing each entity#272

Merged
sappelhoff merged 13 commits intobids-standard:masterfrom
sappelhoff:entitylink
Aug 5, 2019
Merged

[INFRA] Transpose the entity table and link to text anchors describing each entity#272
sappelhoff merged 13 commits intobids-standard:masterfrom
sappelhoff:entitylink

Conversation

@sappelhoff
Copy link
Copy Markdown
Member

@sappelhoff sappelhoff commented Jul 12, 2019

closes #200

--> 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-value pairs (like sub-<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 acq parameter is mentioned several times ... and takes on a special meaning depending on the modality.

Suggestion

I think we could

  1. add an explicit section introducing the key-value pairs (and relating them to the word "entities" and the "entity table" in the appendix)
  2. add another section where each entity has a list of items ... and each item links to an in-text description (within the spec), where it is described what meaning that specific entity takes on in that context.

Example for point 2.

  • Meaning and usage of aqc
    • aqc in Anatomy Imaging Data
    • acq in Task Imaging Data
    • acq in ...

... and in the entity table, we would link from an entity to the list of items (as shown in the example)

@sappelhoff
Copy link
Copy Markdown
Member Author

sappelhoff commented Jul 12, 2019

@yarikoptic
Copy link
Copy Markdown
Collaborator

FWIW
both are equivalently too big ATM, we need to figure it a way to freeze leading column/row ...
Ability to link to specific modality would be a useful addition IMHO. Also I like that in transposed version all key-value pairs are listed horizontally, as if they appeared in a file name - easier to relate.

@sappelhoff
Copy link
Copy Markdown
Member Author

we need to figure it a way to freeze leading column/row ...

I absolutely agree ... I spent some minutes trying to find something: No luck so far.

But I take your comment as a vote that

  • transposing
  • links from entities table to their first in-text reference

would be an improvement.

@sappelhoff sappelhoff added the opinions wanted Please read and offer your opinion on this matter label Jul 12, 2019
@sappelhoff
Copy link
Copy Markdown
Member Author

@yarikoptic it seems like we'd have to write custom CSS to get the sticky first row and column, see: squidfunk/mkdocs-material#1171

@yarikoptic
Copy link
Copy Markdown
Collaborator

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

@choldgraf
Copy link
Copy Markdown
Collaborator

seems good to me!

@franklin-feingold
Copy link
Copy Markdown
Collaborator

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?

@sappelhoff sappelhoff added this to the 1.2.1 milestone Jul 22, 2019
@sappelhoff sappelhoff marked this pull request as ready for review July 25, 2019 13:32
@sappelhoff sappelhoff requested a review from chrisgorgo as a code owner July 25, 2019 13:32
@sappelhoff
Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Collaborator

@yarikoptic yarikoptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is a good point, perhaps we can even enforce this with our linter 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...


## File names consist of key-value pairs (entities)

We define file names with a chain of key-value pairs, each of which we call
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be great 👍

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See sappelhoff#2.

| 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 | | | | | |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@effigies
Copy link
Copy Markdown
Collaborator

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?

@yarikoptic Could you reword this? I don't understand what you're trying to say.

sappelhoff and others added 3 commits July 25, 2019 20:54
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Copy link
Copy Markdown
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two very small cleanups, and then I'm good with this.

Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
@sappelhoff
Copy link
Copy Markdown
Member Author

sappelhoff commented Jul 30, 2019

Two very small cleanups, and then I'm good with this.

cool thanks.

Then once this is merged, I'll open a new issue to track the next enhancements:

  1. Make the first row and first column "sticky" using custom CSS code
  2. Potentially separate the entity table into several sub-tables (one per modality)
    1. this would also make it easier to insert links from an entity in the table to an in-text description of what that entity means in the context of a certain modality
  3. Address some inconsistencies in labelling in the entity table, see [INFRA] Transpose the entity table and link to text anchors describing each entity #272 (comment) for reference

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?

@sappelhoff
Copy link
Copy Markdown
Member Author

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?

Copy link
Copy Markdown
Collaborator

@franklin-feingold franklin-feingold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @sappelhoff ! Looks good!

@effigies effigies dismissed yarikoptic’s stale review August 1, 2019 19:50

I think this is resolved.

@effigies
Copy link
Copy Markdown
Collaborator

effigies commented Aug 1, 2019

@yarikoptic Any remaining qualms?

@franklin-feingold franklin-feingold mentioned this pull request Aug 2, 2019
4 tasks
@sappelhoff sappelhoff merged commit cfa313c into bids-standard:master Aug 5, 2019
@sappelhoff sappelhoff deleted the entitylink branch August 5, 2019 19:44
yarikoptic added a commit to yarikoptic/bids-specification that referenced this pull request Aug 8, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

opinions wanted Please read and offer your opinion on this matter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] Improvements to the "entity table"

5 participants