bids-standard / bids-specification

Brain Imaging Data Structure (BIDS) Specification
https://bids-specification.readthedocs.io/
Creative Commons Attribution 4.0 International
279 stars 163 forks source link

Derivatives: `desc-` to be the last entity when used? #1895

Open arokem opened 3 months ago

arokem commented 3 months ago

In a conversation about diffusion derivatives @tsalo pointed out that in our development of BEP16, we have a desc- entity, followed by param- entity (see: https://github.com/bids-standard/bids-bep016/pull/24/files). He thought this was inelegant and pointed out that in other places (e.g., https://bids-specification--519.org.readthedocs.build/en/519/derivatives/functional-derivatives.html#functional-derivatives-maps), there is an understanding that the desc- entity is the last one to be used before the suffix. I wonder whether others feel similarly and whether we want to be explicit about this, e.g., here:

https://github.com/bids-standard/bids-specification/blob/b91d0e355c69fbfa888577abc03fe8c5bdada592/src/schema/objects/entities.yaml#L68

Remi-Gau commented 3 months ago

In a way we are exicit about it here.

https://github.com/bids-standard/bids-specification/blob/master/src%2Fschema%2Frules%2Fentities.yaml

But we have nothing in the metaschema that says that description must be the last entity.

kabilar commented 3 months ago

+1

I would be in favor of making this explicit.

yarikoptic commented 2 months ago

In a way we are exicit about it here.

https://github.com/bids-standard/bids-specification/blob/master/src%2Fschema%2Frules%2Fentities.yaml

But we have nothing in the metaschema that says that description must be the last entity.

isn't

# This file simply defines the order in which entities should appear within filenames.

making it is as explicit as it can get insofar in the metaschema?

yarikoptic commented 2 months ago

I will propose a quick PR to make it verbalized to human readers of the spec: https://github.com/bids-standard/bids-specification/pull/1915

effigies commented 2 months ago

I believe the question is whether we want to prospectively declare that no future entity may come after desc. Personally, I think it should remain the last, but I'm not sure it's a great idea to foreclose on the possibility of ever putting something after it.

And just a note about that list: It is one of many possible topological sorts for the entities in existing file rules. It could potentially be reshuffled as long as it doesn't change the ordering for a file rule that already exists.

tsalo commented 2 months ago

I think we can treat it as a strong recommendation for PRs and BEPs to retain desc as the last entity. Something like "this is a BIDS convention and, if you feel strongly that a new entity should come after desc, be prepared to defend that decision".