-
Notifications
You must be signed in to change notification settings - Fork 68
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
Deleting all variables doesn't work if one variable is derived from another (in GUI). #897
Comments
I confirmed that if you derived a variable, say a = clt + 100. Select all and delete all you get: clt is used to derive other variables. Delete those first. Rémi can you look at this? |
@vvpalav any progress on this? |
(1) The issue with this is that the new variable is built on the basis of the old one and the old one is kept in memory for provenance purpose. I believe the new variable creation along with some other new variable dependent functionalities were designed with the same approach in mind and changing it around now might affect other things and can lead to a lot of problems on other parts of the application. (2)True, the check's should not happen when all the variables are selected. I have changed the code to meet this requirement. Unfortunately I don't have the latest build (I am building a fresh one now).I will upload the changes from the newer build as soon as it's done. |
I have since had the related experience of trying to delete a subset of variables that include such dependencies. Will the new code work in this case too? |
This is how it works If you select all the variables for deletion - no checks are performed and you can delete all of them without any pop up errors. |
One work around is you can select the dependent variables first and then select the original variables because as your rightly said, this is an iterative process and the code checks for dependent variables one by one as they are on the list. |
Is it possible to automate the last process, ie catch the errors while going through the list, but don't abort? Then, go back through the list and see if any of the previous dependencies/errors have been resolved. This would also work when the user wants to delete-all. |
Yes, that is something that I am doing now. It's not very efficient but I think it will work. |
I've created a branch with the changes called removing_variables_and_dependent_variables. It's not updated and I am not sure if you would be able to use it. Lemme know if you can or cannot. |
@hgohil2805 when you issue a PR i can try to bring it for @cameronsmith1 to test. |
Thanks, All. |
@doutriaux1 I tried to issue a PR but it shows a lot more changed files than it should (probably because I am using an old build). Do you want me to issue one anyways? (I am not that good with git) |
|
@hgohil2805 I created removing_variables_and_dependent_variables_rebased please make sure I didn't mess you up |
@doutriaux1 Thanks a lot!. I was able to create the pull request. @cameronsmith1 hopefully you will be able to test it now:) |
@hgohil2805 @cameronsmith1 will test soon it's on a computer he can access now. We should know tomorrow or by monday |
Partial success. If I load a variable 'T', and then create dependent variables t1 = 2 * T and t2 = 2 * t1, then the deletion of t1 and t2 works as intended. However, if I make the dependencies 3 deep, eg t3 = 2 * t2, and try to delete t1, t2, and t3, then it only deletes t2 and t3 and complains about t1. It would be nice to be infinitely recursive, but looping several times (4? 5? 6?) is probably good enough in practice. Separately, I found that if I just tried creating new variables like ta = T, then UVCDAT got very confused, and wouldn't let me delete anything. I don't know whether this is a bug in the new code, or a consequence of some pre-existing bug. Separately again, I get a seg-fault whenever I try to plot something. This is the first time I have used UVCDAT on this system, so I don't know whether this is related or not. |
I could plot with uvcdat-master, I will revert to that and you can try plotting again. If it still fails I suspect something wrong with your x forwarding. Otherwise it might be the branch. |
@cameronsmith1 2 - Well that should not really happen. I will try and create new variables in a similar manner and test it. Also, Thanks for testing it quick:) |
@cameronsmith1 it should be up and running on rhea with the fix from @hgohil2805 at: |
Yes, the deletions now seems to be working as expected, except for when I set a = b, and then it gets confused (eg, it will let me delete b but not a). |
In the UVCDAT GUI, I had a few variables and wanted to delete them all. Hence, I clicked the select_all, and hit delete. However, it produced an error that some variables were derived from other variables (which was true because I had generated variables that were averages of the original variables). This raises two issues: (1) I expected that the new variable would be independent of the ones it is derived from, which makes me worry that I have to worry about variable dependencies, and (2) why should it matter if I am deleting all of the variables? Note: I am using version 2.0.0.
The text was updated successfully, but these errors were encountered: