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

[ENH] Added the specification for using HED libraries in BIDS

Open VisLab opened this issue 2 years ago • 9 comments

This is a preliminary request for change in the BIDS specification to accommodate HED libraries.

The first official HED library schema (SCORE library for clinical neurological annotation) is close to release.

We will prepare a PR for the bids-validator to validate datasets using HED libraries as well as an example datasets for bids-examples when there is agreement on the format.

We would appreciate reviews and comments: @sappelhoff @Remi-Gau @tsalo (the yaml could be improved--please help) @happy5214 @IanCa, @dorahermes @dungscout96 @smakeig, @tpatpa.

VisLab avatar May 23 '22 22:05 VisLab

Codecov Report

Merging #1106 (6101459) into master (b3afa2a) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1106   +/-   ##
=======================================
  Coverage   88.33%   88.33%           
=======================================
  Files           6        6           
  Lines        1020     1020           
=======================================
  Hits          901      901           
  Misses        119      119           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar May 23 '22 22:05 codecov[bot]

Thank you @VisLab, looks good to me!

tpatpa avatar May 24 '22 16:05 tpatpa

I would like to hold off for another week to allow more internal discussion.

In working on the example use cases using the score library, it has become apparent that many users will just want to use the score library when they are doing neurological annotation and not use the base schema at all.

We have the option of allowing the following so that users wouldn't have to prefix the score tags:

"HEDVersion": {
      "base": "score_0.0.1",
      "libraries": {
          "bs": "8.0.0"
       }
}

or also:

"HEDVersion":  "score_0.0.1"

@tpatpa @dorahermes comments?

VisLab avatar Jun 07 '22 13:06 VisLab

@tpatpa @happy5214 @dorahermes @sappelhoff @dungscout96 @tsalo @yarikoptic Please review. After discussion.... the proposal has been simplified... for the better.

VisLab avatar Jun 09 '22 21:06 VisLab

great! lgtm

dorahermes avatar Jul 08 '22 18:07 dorahermes

This version is correct and has been agreed upon by the Hed Working Group. The bids-validator part isn't quite ready yet. I'll try to work on a PR for the BIDS validator side, which just needs a small change.

The modifications needed for the HED side aren't quite there yet, but we can probably write a by-pass temporarily. (We recommend that users check their validation using the Python validator until we get it completed.) @happy5214

As for a link to a library: the SCORE library official 1.0.0 was finished and out for community comment. @tpatpa @dorahermes need to give final approval and then we can release it and provide the stable link. (We know what the link will be but once we put the schema there, tools will start using it.)

It would be nice if this made it into the new release. What time frame do we have for finishing the validation side?

VisLab avatar Jul 22 '22 13:07 VisLab

I think we should wait on the validation of the HEDVersion using a regular expression unless this is standard for BIDS and we have to do it. I would rather just pass the HEDVersion to the hed-validator and let it resolve the version. On the first pass, we would only support the straight version strings as shown in the example.

However, longer term we would support BIDS URI's, the PR of which I notice is also moving along.

VisLab avatar Jul 22 '22 15:07 VisLab

The 1.8 release will probably come mid September. It'd be great to have the new hed features in by then!

sappelhoff avatar Jul 22 '22 15:07 sappelhoff

I think we should wait on the validation of the HEDVersion using a regular expression unless this is standard for BIDS and we have to do it. I would rather just pass the HEDVersion to the hed-validator and let it resolve the version. On the first pass, we would only support the straight version strings as shown in the example.

I believe BIDS has the primary responsibility to validate HEDVersion, whether or not we do our own validation, especially if it's as simple as adding a regex to an already-implemented framework. We implement the functionality on our end as a matter of convenience and expedience, but in the end this is a format defined by BIDS, not hed-validator.

happy5214 avatar Jul 22 '22 15:07 happy5214

We have now released hed-validator 3.8.0 on npm supporting HED library schema. Could we move this PR forward now that it has supporting PRs bids-standard/bids-validator#1496 and bids-standard/bids-examples#332?

I think all three PRs are ready to go. @sappelhoff @Remi-Gau @rwblair

VisLab avatar Aug 29 '22 17:08 VisLab

I think the only open question is whether or not we want to add the regexp suggested by @happy5214 to the BIDS schema validation.

If you have strict rules about how versions for HED need to look like, then I think it'd be a good idea ... even if the regexp looks a bit unwieldy, as described in https://github.com/bids-standard/bids-specification/pull/1106#discussion_r895041453

cc @VisLab

sappelhoff avatar Aug 29 '22 20:08 sappelhoff

I have added the hed_version format as suggested by @happy5214. If you disagree, we can discuss removing it again -- but I think it's a good idea to validate HED versions early on, and not only in the HED validator.

sappelhoff avatar Aug 30 '22 11:08 sappelhoff

Yes the RegEx is fine. I had a chance to test on our set of testcases. Thanks....

VisLab avatar Aug 30 '22 21:08 VisLab

Thanks @VisLab et al.

:tada:

sappelhoff avatar Aug 31 '22 08:08 sappelhoff

Special thanks to @happy5214

VisLab avatar Sep 01 '22 10:09 VisLab

I would prefer to defer adding this regular expression. We do use regular expressions as part of the checking of schema for the hed-validator, but they are not quite this regular expression. Let's put this on a todo list for a future PR.

On Mon, Aug 29, 2022 at 3:24 PM Stefan Appelhoff @.***> wrote:

I think the only open question is whether or not we want to add the regexp suggested by @happy5214 https://github.com/happy5214 to the BIDS schema validation.

If you have strict rules about how versions for HED need to look like, then I think it'd be a good idea ... even if the regexp looks a bit unwieldy, as described in #1106 (comment) https://github.com/bids-standard/bids-specification/pull/1106#discussion_r895041453

cc @VisLab https://github.com/VisLab

— Reply to this email directly, view it on GitHub https://github.com/bids-standard/bids-specification/pull/1106#issuecomment-1230822747, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJCJOXSK3DPY4Q6UTEYEQTV3UL7PANCNFSM5WXIN25A . You are receiving this because you were mentioned.Message ID: @.***>

VisLab avatar Oct 11 '22 08:10 VisLab