This fixes an issue with the AnnData upload UX where the external link feature for clustering data does not persist when saving the form. This was due to how the data is validated and saved inside the AnnDataFileInfo object and the parameters not being allowed or handled correctly. Now, these parameters are allowed and the data is saved correctly. Additionally, this cleans up some tests where names of clustering in AnnData files were accidentally prepending X_.
This does bring up a frequent issue when adding attributes to models - the need to add them to the "strong parameters" block in associated controllers (e.g. params.require(model_name).permit). I created SCP-5818 to track this. It's not critical work, but would hopefully alleviate this issue.
MANUAL TESTING
You will need to turn off caching for this to work properly, or start DelayedJob.
Boot as normal and sign in
Load the upload wizard for any AnnData-based study
Go to the clustering tab and add an external link for one of the clusters
Open the explore tab for the above study/cluster and confirm the link is present above the scatter plot legend
BACKGROUND & CHANGES
This fixes an issue with the AnnData upload UX where the external link feature for clustering data does not persist when saving the form. This was due to how the data is validated and saved inside the
AnnDataFileInfo
object and the parameters not being allowed or handled correctly. Now, these parameters are allowed and the data is saved correctly. Additionally, this cleans up some tests where names of clustering in AnnData files were accidentally prependingX_
.This does bring up a frequent issue when adding attributes to models - the need to add them to the "strong parameters" block in associated controllers (e.g.
params.require(model_name).permit
). I created SCP-5818 to track this. It's not critical work, but would hopefully alleviate this issue.MANUAL TESTING
You will need to turn off caching for this to work properly, or start DelayedJob.