bids-specification icon indicating copy to clipboard operation
bids-specification copied to clipboard

Remove duplicate entity definitions in specification text

Open tsalo opened this issue 5 years ago • 4 comments

In #568 we created a new appendix with the entity definitions. Whenever the entities are referenced in the text, a hyperlink is used to point to the appropriate section of the appendix. The appendix definitions should be considered the "canonical" definitions for these entities, with text in the rest of the specification used only to provide modality-specific context and examples. We did not, however, edit the specification text much in #568, so there are a lot of duplicate definitions and elaborations that could be removed or at least cut down.

tsalo avatar Sep 17 '20 18:09 tsalo

Was thinking I could do some of that.

Just to be sure: any mention of any of the entities from the appendix should have a hyperlink?

But only if it is "on its own" and not in an example of a "path".

For example:

Add a hyperlink to sub-<label> in the example below.

The purpose of this RECOMMENDED file is to describe properties of participants
such as age, sex, handedness.
In case of single-session studies, this file has one compulsory column
`participant_id` that consists of `sub-<label>`, followed by a list of optional
columns describing participants.
Each participant MUST be described by one and only one row.

But obviously not sub-<label>[_ses-<label>][_acq-<label>][_run-<index>]_phasediff.json

In this particular case, the sidecar JSON file
`sub-<label>[_ses-<label>][_acq-<label>][_run-<index>]_phasediff.json`
MUST define the time of two echos used to map the phase and finally calculate
the phase-difference map.

Remi-Gau avatar Dec 28 '20 07:12 Remi-Gau

I wish we could render code snippets with hyperlinks, but I don't think it's possible in Markdown (it was something I looked into for #610).

In addition to the linking, there are actual definitions that could be eliminated or reduced, such as this one in MEG:

The proc-

I don't know what the updated text should be, but since the description in the text is a complete duplicate of the definition of the entity, it would be great to reduce it. I think the main text should provide some section-specific context, rather than fully defining the entity. Plus, duplications in the text will make it harder to update entity definitions, since we'll have multiple places we have to change.

tsalo avatar Dec 28 '20 16:12 tsalo

Here is a gist that may make it possible to add hyperlinks to code blocks: https://gist.github.com/jesstelford/cb4dd6fafc18221ce27250e84fd19327

tsalo avatar Aug 17 '22 13:08 tsalo

probably needs another pass to see how many duplicates are left

Remi-Gau avatar Sep 26 '23 13:09 Remi-Gau