pepkit / peppy

Project metadata manager for PEPs in Python
https://pep.databio.org/peppy
BSD 2-Clause "Simplified" License
37 stars 13 forks source link

Pipeline key match is case-sensitive #225

Open vreuter opened 5 years ago

vreuter commented 5 years ago

What's are everyone's / anyone's thoughts about making it case-insensitive? Example: right now, defining a pipeline_args section of a project config with WGBS and RRBS as section keys for opt/arg pairs won't match a pipeline interface that names its pipelines wgbs and rrbs, but obviously the failure to match is silent since the intent can't be inferred.

vreuter commented 5 years ago

@nsheff @afrendeiro @michalstolarczyk @aaron-gu @jpsmith5 , others...anyone feel free to chime in

aaron-gu commented 5 years ago

Can there be a notification upon failure saying something like "Did you mean to use 'wgbs' instead of 'WGBS'"?

vreuter commented 5 years ago

Yeah I think there should be a message regardless; I'd just like to make match-and-proceed be the implicit behavior, with a notification message saying that's what's going on. That's my preference anyway but wanted to get an little poll of others' thoughts.

nsheff commented 5 years ago

I like the match-warn-and-proceed idea.

so, first it matches case sensitive. if it can't find one, it looks case-insensitive and proceeds, with a warning.

On second thought, I would probably just do a suggestion. So, first match case sensitive. if that fails, match case-insensitive -- if it finds, it just says "did you mean ____?" and does not proceed.

Better yet: we could do some kind of fancy similarity search and suggest any of the availble ones that look similar, not just on case sensitivity... how hard would that be?

vreuter commented 5 years ago

My question would be...what fraction of the time would someone not want to proceed with, e.g. rrbs if they put RRBS?

nsheff commented 5 years ago

true, but the interface file could potentially be read by other tools, and every that reads it would then have to implement this... or it works with some tools and not others. I think I'd rather force the user to get it right. actually I think I got that philosophy from you @vreuter :smile:

I don't have strong feelings on it though, as long as there's a clear warning.

nsheff commented 5 years ago

Alright I conclude we should do the following:

First match case sensitive. if that fails, match case-insensitive -- if it finds, it just says "did you mean ____?" and does not proceed.

vreuter commented 5 years ago

what's the error type?

nsheff commented 5 years ago

It should probably be just the same as when you don't have a match, whatever we're doing now.

vreuter commented 5 years ago

:ok_hand: