Skip to content
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

Please return leading . in extension #618

Closed
yarikoptic opened this issue May 22, 2020 · 3 comments · Fixed by #629
Closed

Please return leading . in extension #618

yarikoptic opened this issue May 22, 2020 · 3 comments · Fixed by #629
Milestone

Comments

@yarikoptic
Copy link
Collaborator

See bids-standard/bids-specification#152 (review) for more info on bringing more consistency to bids spec and tooling

@tyarkoni
Copy link
Collaborator

Sounds good, but do we want to issue a deprecation warning for a couple of months before releasing that change? It will definitely break a bunch of pipelines.

@effigies
Copy link
Collaborator

The parsing is easily switched from accommodating one to the other, but it's the values we return that are going to cause pain.

Maybe we can place the warning any place that extensions are generated or used, like:

>>> import bids
>>> layout = BIDSLayout(...)
FutureWarning: The 'extension' entity currently excludes the leading '.'. As of version
X.Y.Z, it will include the leading dot. To suppress this warning and include the leading
'.', use `bids.config.set_extension_mode("dot")`.
>>>
>>> import bids
>>> bids.config.set_extension_mode("dot")
>>> layout = BIDSLayout(...)
>>>

@yarikoptic
Copy link
Collaborator Author

oh, like from __future__ import print_function ;) cute idea!
I would make "extension_mode" name a bit more verbose like "dot_extension" - "dots" of various kinds could come up multiple times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants