Opened 2 years ago

Closed 3 months ago

#754 closed defect (fixed)

advanced plug-in model editor - improvements

Reported by: richardh Owned by:
Priority: major Milestone: SasView 5.0.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing


(1) Minor chicken & egg situation here.
The "advanced" plug-in model editor only opens successfully compiled models. Even if you close an opened file, the file/open is greyed out so you cannot open any other file unless you instead go to the "tools" drop down and use the full python shell.

(2) Note also that the latter when opening also opens associated mymodel.c, but the advanced model editor does not.

(3) Possibly change custom model editor items to rename "new" to "new simple" and add "new advanced" to allow to open any file in plug-in models directory (avoiding temptation for users to edit a built in model under sasview!) [The simple editor is very good!]

(4) "delete" could put up an "are you sure" box as it really does delete the files, not just remove the model from sasview.

(5) can "check model" also perform unit tests rather than having to load and run separate python code?

Change History (9)

comment:1 Changed 2 years ago by pkienzle

Re: (5), sas.sasgui.perspectives.calculator.pyconsole.check_model could instead call sasmodels.model_test.run_one. The run_one function will need to be updated so that output is sent to a string and returned from the function using

    stream = _WritelnDecorator(StringIO()))
    result = stream.get_value()
    return result

comment:2 Changed 2 years ago by smk78

In 8a631370b7b82ba2689d158abfc3faf1840f39b5/sasview:

Updated documentation and images for the Python shell/editor. Refs #754

comment:3 Changed 2 years ago by butler

  • Milestone changed from SasView 4.1.0 to SasView 4.2.0

really need to fix this but given resource constraints and priority of other tickets reluctantly moving to 4.2 along with related ticket #660

comment:4 Changed 19 months ago by lewis

(1) Seems to be fixed now but I can't pinpoint which commit fixed it
(2) Fixed in commit d472e86

comment:5 Changed 18 months ago by lewis

In 489f53a68015fe01293d70169de3d0f8ba84369e/sasview:

Show warning message before deleting plug-in model. Refs #754

comment:6 Changed 16 months ago by butler

  • Milestone changed from SasView 4.2.0 to SasView 5.0.0

comment:7 Changed 3 months ago by piotr

None of the issues in the bug description applies to the new plugin editor/manager. This can be closed, I think.

comment:8 Changed 3 months ago by butler

Hummm… indeed it looks like most of these were in fact fixed by 4.2. The only question I guess is whether the advanced editor should read any file in the directory or just valid model files? Am tempted to say we are done here but actually would need to test the latest 5.0 version I guess. Should this be discussed at next conf call?

comment:9 Changed 3 months ago by butler

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

This last is also fixed in 5.0 according to Piotr so we can close this ticket.

Note: See TracTickets for help on using tickets.