Opened 8 years ago

Closed 8 years ago

#756 closed defect (fixed)

Change category "Customized Models" to "Plugin Models"

Reported by: smk78 Owned by: butler
Priority: blocker Milestone: SasView 4.1.0
Component: SasView Keywords:
Cc: Work Package: SasView Fitting Redesign

Description

Now we have agreed to call what were "custom" models "plugin" models the category manager needs updating.

Change History (6)

comment:1 Changed 8 years ago by smk78

To note "Customized Models" appears as a string in a number of locations:

basepage.py (9 matches)
1,768: custom_model = 'Customized Models'
3,387: uncat_str = 'Customized Models'
3,416: if category == 'Customized Models':

fitting.py (24 matches)
321: custom_model = 'Customized Models'

models.py (6 matches)
326: self.model_combobox.set_list("Customized Models", self.plugins)
347: self.model_combobox.reset_list("Customized Models", self.plugins)
390: self.model_combobox.set_list("Customized Models", self.plugins)

comment:2 Changed 8 years ago by butler

The problem here is that category manager does not know about plugins at the moment so that the special "customized models" is done behind the back of category manager. Now that the models are "the same" and the instructions show how to insert the default category into the model, the correct answer is to change the behavior all together and get rid of the special category. This will require some effort but is independent of the GUI so worth doing. A quick answer would be to replace all the instances of "cutomised" with Plugin but is discouraged as that will hide the problem and we will then forget to clean up.

comment:3 Changed 8 years ago by butler

Branch ticket-756 created and basic replacing of customized with Plugin done. Dealing with category manager however is trickier since plugins have a variety of methods to keep the list up to date on the fly - plugin models can be updated, added, or deleted from within SasView so that every time the combo box is populated it needs to have the latest. This becomes trickier if the those models are dispersed through all the categories. The structure factor category is another problematic one since its members should be defined internally (depending on the model contents) and not by random user choices

One option would be to have a Plugins and structure factor category that cannot be edited but allow models in those categories to be added to other categories as well. That obviates the need for all lists to always be updated since a model cannot be added to a list (outside of plugin) without being first in the plugins list. However, deletion or updating might still require some cross talk.

We need a concensus on the desired behavior before proceeding further.

comment:4 Changed 8 years ago by butler

  • Status changed from new to accepted

comment:5 Changed 8 years ago by butler

One of the manifestations of errors that this ticket is needed to correct was raised as a seperate ticket #781. Basically when loading an old style model after the "Load Plugin Models" operation (either from the menu, or from editing and saving a model) caused an error that either made a blank fit page or froze it completely. Either way, the workaround is to request a new fit page, which then makes the old page accessible. The problem, as documented in that ticket, is that the category variable is now "Plugin Model" but when checking at branch points whether we are working with a plugin or built-in the compare is made to the old string "Customized Model" which of course yields false and thus the plugin is treated as a built-in with the observed consequence.

When the ticket-756 branch is merged to master the whole loading of different categories should be rigourously exercised to make sure everything has been caught.

comment:6 Changed 8 years ago by GitHub <noreply@…>

  • Resolution set to fixed
  • Status changed from accepted to closed

In 587ce8c56a33c3057f6ea40c864cc5d365198687/sasview:

Merge pull request #34 from SasView?/ticket-756

ticket-756: Change category "Customized Models" to "Plugin Models". Closes #756.

Note: See TracTickets for help on using tickets.