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

Change category "Customized Models" to "Plugin Models" (Trac #756) #872

Closed
smk78 opened this issue Mar 30, 2019 · 6 comments
Closed

Change category "Customized Models" to "Plugin Models" (Trac #756) #872

smk78 opened this issue Mar 30, 2019 · 6 comments
Assignees
Labels
Blocker Prevents a different issue from being resolved Defect Bug or undesirable behaviour
Milestone

Comments

@smk78
Copy link
Contributor

smk78 commented Mar 30, 2019

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

Migrated from http://trac.sasview.org/ticket/756

{
    "status": "closed",
    "changetime": "2017-02-27T16:38:39",
    "_ts": "2017-02-27 16:38:39.824246+00:00",
    "description": "Now we have agreed to call what were \"custom\" models \"plugin\" models the category manager needs updating.",
    "reporter": "smk78",
    "cc": "",
    "resolution": "fixed",
    "workpackage": "SasView Fitting Redesign",
    "time": "2016-10-10T16:48:33",
    "component": "SasView",
    "summary": "Change category \"Customized Models\" to \"Plugin Models\"",
    "priority": "blocker",
    "keywords": "",
    "milestone": "SasView 4.1.0",
    "owner": "butler",
    "type": "defect"
}
@smk78 smk78 added this to the SasView 4.1.0 milestone Mar 30, 2019
@smk78 smk78 added Blocker Prevents a different issue from being resolved Defect Bug or undesirable behaviour Incomplete Migration and removed Incomplete Migration labels Mar 30, 2019
@smk78
Copy link
Contributor Author

smk78 commented Mar 30, 2019

Trac update at 2016/10/10 16:52:55: smk78 commented:

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)

@butlerpd
Copy link
Member

Trac update at 2016/10/10 20:38:47: butler commented:

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.

@butlerpd
Copy link
Member

Trac update at 2017/02/06 03:58:41: butler commented:

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.

@butlerpd
Copy link
Member

Trac update at 2017/02/06 04:02:27: butler changed status from "new" to "accepted"

@butlerpd
Copy link
Member

Trac update at 2017/02/26 16:19:45: butler commented:

One of the manifestations of errors that this ticket is needed to correct was raised as a seperate ticket #889. 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.

@sasview-bot
Copy link

Trac update at 2017/02/27 16:38:39:

In changeset 587ce8c:

#!CommitTicketReference repository="sasview" revision="587ce8c56a33c3057f6ea40c864cc5d365198687"
Merge pull request #262 from SasView/ticket-756

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker Prevents a different issue from being resolved Defect Bug or undesirable behaviour
Projects
None yet
Development

No branches or pull requests

3 participants