-
Notifications
You must be signed in to change notification settings - Fork 41
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
Model Editor Bug Fixes #2901
base: release_6.0.1
Are you sure you want to change the base?
Model Editor Bug Fixes #2901
Conversation
…model file before approving it; condense into checkModel method
…o checkModel in previous commit
…with C code. Clear highlights from both python and C windows if checks pass. Ensure that checkModel() is always passed a path argument instead of raw text.
… by removing os.remove(). allow user to load .c models into editor even if .c file fails model checks
…l-editor-bug-fixes
Converting back to draft until 6.0.0 bug fix branch is created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally, this almost does what it says it does, but I'm not 100% certain this fixes #1633.
If params are in the model text, but not defined in the param table, an error is displayed, but the model file is stil generated. This causes issues when correcting the model if the overwrite option is not selected. I'm not sure if this is the expected behavior or not. @rozyczko, what do you think?
Please note - I am planning to fix the issues I've found here. |
…arams in the model editor window
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally, this almost does what it says it does, but I'm not 100% certain this fixes #1633.
This fixes the issue.
If params are in the model text, but not defined in the param table, an error is displayed, but the model file is stil generated. This causes issues when correcting the model if the overwrite option is not selected. I'm not sure if this is the expected behavior or not.
This is a bigger fix than expected and should not hold up this PR. Many of the underlying checks require the file to exist, so I think this is ready.
Description
Fixes minor bugs in the model editor (
PluginDefinition.py
and its parentTabbedModelEditor.py
) that impede usability or cause undesirable effects.PluginDefinition
orModelEditor
(558c7a1, 54a8aaf, 2b71022)ModelEditor
and only model tests were run when usingPluginDefinition
. The syntax checks were done using theast
library, which only checks for SyntaxErrors. I have kept this check as the first one that runs because it can often catch SyntaxErrors with more precision than usingGuiUtils.checkModel()
. In theory we don't need to run theast
check on models generated with the plugin editor, but it doesn't seem to add significant overhead and could even be useful if future changes break the model template.How Has This Been Tested?
Verified correct behavior in SasView and checked wide variety of possible user inputs to search for additional bugs. Windows installer tested and verified.
Review Checklist:
Documentation (check at least one)
Installers
Licensing (untick if necessary)