mcneilco / acas

http://mcneilco.com/acas.html
GNU General Public License v3.0
12 stars 5 forks source link

Allow SEL to load experiments with protocols that match existing case-insensitive #1023

Open jmcneil86043 opened 2 years ago

jmcneil86043 commented 2 years ago

When loading an experiment, ACAS searches for an existing protocol to associate. This feature would do a case-insensitive search for the protocol name. This new feature should be enabled with a configuration that defaults to off so existing systems behaviors don’t change on upgrade

Expected Behavior

When an experiment SEL file is dry-run, if the protocol name provided matches an existing protocol name, but with different capitalization, a warning is issued. If the file is uploaded, then the new experiment is associated with the protocol it found with the alternate capitalization. If there are two protocols in the system that match with different cases, then an error is returned

Current Behavior

The standard no matching protocol behavior is followed for protocol name that have different capitalization

brianbolt commented 2 years ago

This is a great new feature but I don't think this should be a feature flag, it sounds like it should be the default. It's up to the user to head to the warning of uploading to the wrong protocol.

jmcneil86043 commented 1 year ago

Getting serious about implementation. Here is my analysis

@brianbolt @bffrost What is your advice?

bffrost commented 1 year ago

@jmcneil86043 I like option 2. It seems safer for the reasons you outlined.

philippcheung commented 1 year ago

Just making I understand -- do we need to implement a new r-acas method and a roo method

New method in r-acas

image

New method in roo -- APIProtocolController.java

image

New method in roo -- Protocol.java

image

Looks like ProtocolLabel.java already has a implementation of like

image

Finally, let me know if you'd rather add new "searchType" to the method instead, where the default is exact, but options can include "exact","like"

jmcneil86043 commented 1 year ago

Hi @philippcheung I don't have a qualified opinion about new have API versus qualified. It looks to me like a new API would match prior practice (as you pointed out, for example, in ProtocolLabel.java

I'm not sure you need a new R method or if you should change the behavior of the current one. I guess a new function is nice parallel construction, so easy to read. In either case you also need to change racas api.R Line 78 checkExistance()

@brianbolt thoughts?

brianbolt commented 1 year ago

I think you should just change the behavior of the current racas function. I just think the other one would be unused if we duplicated it and pointed it at the other java route.