-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing leading period from YAML extensions? #990
Comments
We included the leading dot because that's how extensions are defined in the common principles and how they're used in pybids. Here's the description in common principles:
|
Yeah, we went through a period of normalizing different tooling. Reverting now would be pretty annoying to any users of libraries (notably pybids) that started out not including the initial period and went through a |
I've come across a solid reason to keep the leading period in #1036. We have some extensions ( |
hmmmm... thanks for the update in any case :) I mean those have special meanings, and can be easily represented with simple logic — but, are you sure that's not actually a sign of using the concept of “extensions” incorrectly? We actually have the |
Primarily to reflect the fact that extensions now include leading . . Extra references on this subject: - bids-standard#830 -- about new warning from pandas (The frame.append method is deprecate) - bids-standard/bids-specification#990 discussion on extensions to include leading .
Well, under assumption that "there MUST NOT be an empty extension" (e.g. just
BUT because it is a matter of the fact that some extension might be a directory or not, and now that there is https://github.com/bids-standard/bids-specification/blob/HEAD/src/schema/objects/extensions.yaml -- I think "extension" notion is not really a "file extension" but rather a "thing" of its own mapping its value to the one in the Having trailing
well, had to rerun tutorial: bids-standard/pybids#832 since But if you look at result records like {'acquisition': 'fullbrain',
'datatype': 'func',
'extension': '.tsv.gz',
'run': 1,
'session': '1',
'subject': '01',
'suffix': 'physio',
'task': 'rest'} you will see that Having said all that, I don't think there is anything to be done at this point regarding the initial issue/title - i.e. the "leading period". Not yet 100% sure about trailing |
Here's an update on how the If the list of permitted extensions includes Nevertheless even if For the time being I'm going with |
If we're seriously considering reverting this change, it would be worth reviewing the original discussion that led to the push for consistency in the current direction: #152 |
I personally think that fortunately or unfortunately we are past that point now since it might be too intrusive to change within
So, overall we have not defined a notion of "extension" but rather of "File extension". Should we define "Directory extension"? should we generalize into "File or directory name extension" and include |
At this point I have temporarily downgraded this to low-priority in my head, but I still think it's a good idea :( One idea would be:
e.g. README:
required: true
directory_extensions:
- ""
- .md
- .rst
extensions:
- ""
- .md
- .txt Given how JSON is parsed, |
I was wondering whether there is a specific reason for having the extensions recorded with a leading period in the YAML schema data.
Maybe the leading period should be inserted by path constructors based on the procedural information given by the “extension” designation, similarly to how suffixes aren't recorded with a leading underscore?
The “extension” designation is not arbitrary as it stands anyway, since it already defines the position of the string in the path... so I don't think this would make it more fragile in any way.
The text was updated successfully, but these errors were encountered: