-
Notifications
You must be signed in to change notification settings - Fork 4
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
PR Insert widget #109
PR Insert widget #109
Conversation
for more information, see https://pre-commit.ci
@casperdcl Thank you for your commits. When I pulled them 128 tests failed and 8 passed. I do not see a red cross in the checks above. Could you look into why the checks have passed in GitHub? Also, would you like to fix the code or should I do it? |
@@ -23,6 +21,13 @@ class UIFormWidget: | |||
| | | |||
+----------------------------------------------------------+ | |||
''' | |||
def __init__(self, *args, **kwargs): |
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.
@casperdcl why do we add the init here with the default states? We add the other dictionary in the class below.
Please do push any fixes! It might help me find the problem(s) with the tests :/ |
I fixed most errors. |
unrelated #128 lol. Issue number 128 for 128 failing tests :D TL;DR you probably had 1 failing test which didn't clean up after itself so it causes the rest to fail. |
Co-authored-by: Edoardo Pasca <[email protected]>
@casperdcl Regarding the style of the docstring I am trying to use the CIL convention (with the spaces around ":"). Ideally we would change all of them to be consistent. |
ah ok sure https://numpydoc.readthedocs.io/en/latest/format.html#parameters no problem. |
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.
🥳
Closes #103
closes #105
closes #95
Closes issue #107.
Partially resolves 108.
Full summary:
INSERT WIDGET CHANGES
insertWidgetToFormLayout
toUIFormWidget
,FormDockWidget
andFormDialog
.insertWidget
toinsertWidgetToVerticalLayout
in FormDialog.insertWidgetToFormLayout
.insertWidgetToVerticalLayout
.list_all_widgets
to the unit test classFormsCommonTests
.add_every_spanning_widget
to the unit test classFormsCommonTests
._addWidget
so it invokesinsertWidgetToFormLayout
.insert_widgets_example
DICTIONARY CHANGES
popWidgetFromDictionary
.getWidgetRow
.STATE SAVING CHANGES
getWidgetState
so it reads the widget row too.applyWidgetState
so it sets the widget row.getNameAndRoleFromNameKey
and_getNameAndRoleFromWidget
applyWidgetStates
so it checks states are the same as in the form.OTHER CHANGES
setDefaultWidgetStatesVisibleTrue
Before first review.
INSERT WIDGET CHANGES
insertWidget
toinsertWidgetToVerticalLayout
in FormDialog.insertWidgetToVerticalLayout
.insertWidgetToFormLayout
toUIFormWidget
,FormDockWidget
andFormDialog
.insertWidgetToFormLayout
.list_all_widgets
to the unit test classFormsCommonTests
.add_every_spanning_widget
to the unit test classFormsCommonTests
._addWidget
so it invokesinsertWidgetToFormLayout
.insert_widgets_example
DICTIONARY CHANGES
increaseNumWidgets
anddecreaseNumWidgets
.populateWidgetDictionary
.removeWidgetFromDictionary
.removeWidget
so that it creates and populatesself.removed_widget_dictionary
.getRemovedWidgets
_addWidget
.getWidgetNumber
._populateWidgetNumberDictionary
and_popWidgetNumberDictionary
.STATE SAVING CHANGES
getWidgetState
so it reads the widget number too.applyWidgetState
so it sets the widget number.getNameAndRoleFromNameKey
and_getNameAndRoleFromWidget
applyWidgetStates
so it removes/inserts the widgets in the form in accordance with the widgets present in the stateOTHER CHANGES
setDefaultWidgetStatesVisibleTrue