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

custom model name and id must be the same (Trac #674) #805

Closed
pkienzle opened this issue Mar 30, 2019 · 3 comments
Closed

custom model name and id must be the same (Trac #674) #805

pkienzle opened this issue Mar 30, 2019 · 3 comments
Assignees
Labels
Defect Bug or undesirable behaviour Major Big change in the code or important change in behaviour
Milestone

Comments

@pkienzle
Copy link
Contributor

pkienzle commented Mar 30, 2019

The id for the model comes from the filename, and can be used to find and load the model on the path. The name for the model is the name displayed in the dialog box, which need not match the name of the python file.

If the name and id differs for a custom model then custom model directory processing halts with an error such as the following:

2016-09-29 07:51:39,932 ERROR Traceback (most recent call last):
  File "/Users/pkienzle/Source/sasview-new/src/sas/sasgui/perspectives/fitting/basepage.py", line 1882, in _show_combox_helper
    m_list.append(self.model_dict[str_m])
KeyError: 'myonion'

and the remaining custom models will not appear in the !SasView gui.

For the file model_name.py, id is model_name and name defaults to "Model Name". We may want to change this default behaviour (defined in sasmodels/modelinfo.py:make_model_info).

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

{
    "status": "closed",
    "changetime": "2016-10-08T14:22:32",
    "_ts": "2016-10-08 14:22:32.148957+00:00",
    "description": "The id for the model comes from the filename, and can be used to find and load the model on the path. The name for the model is the name displayed in the dialog box, which need not match the name of the python file.\n\nIf the name and id differs for a custom model then custom model directory processing halts with an error such as the following:\n{{{\n2016-09-29 07:51:39,932 ERROR Traceback (most recent call last):\n  File \"/Users/pkienzle/Source/sasview-new/src/sas/sasgui/perspectives/fitting/basepage.py\", line 1882, in _show_combox_helper\n    m_list.append(self.model_dict[str_m])\nKeyError: 'myonion'\n}}}\nand the remaining custom models will not appear in the !SasView gui.\n\nFor the file model_name.py, id is model_name and name defaults to \"Model Name\".  We may want to change this default behaviour (defined in sasmodels/modelinfo.py:make_model_info).",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "fixed",
    "workpackage": "SasView Bug Fixing",
    "time": "2016-09-29T12:26:12",
    "component": "SasView",
    "summary": "custom model name and id must be the same",
    "priority": "major",
    "keywords": "",
    "milestone": "SasView 4.1.0",
    "owner": "mathieu",
    "type": "defect"
}
@pkienzle pkienzle added this to the SasView 4.1.0 milestone Mar 30, 2019
@pkienzle pkienzle added Defect Bug or undesirable behaviour Incomplete Migration Major Big change in the code or important change in behaviour and removed Incomplete Migration labels Mar 30, 2019
@mdoucet
Copy link
Contributor

mdoucet commented Mar 30, 2019

Trac update at 2016/10/08 14:22:19: mathieu commented:

This has been fixed by #848

@mdoucet
Copy link
Contributor

mdoucet commented Mar 30, 2019

Trac update at 2016/10/08 14:22:26:

  • mathieu changed owner from "" to "mathieu"
  • mathieu changed status from "new" to "accepted"

@mdoucet
Copy link
Contributor

mdoucet commented Mar 30, 2019

Trac update at 2016/10/08 14:22:32:

  • mathieu changed resolution from "" to "fixed"
  • mathieu changed status from "accepted" to "closed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Bug or undesirable behaviour Major Big change in the code or important change in behaviour
Projects
None yet
Development

No branches or pull requests

2 participants