Add strict validation check for core dependencies#130
Conversation
6d46cce to
153a046
Compare
yakutovicha
left a comment
There was a problem hiding this comment.
Thanks, @unkcpz, I tested the combination of aiidalab-home and aiidalab PR - they seem to work! I didn't have time yet to closely look at the code, but what I wonder is - does it make sense to show the incompatible versions? Maybe we should hide them and have a tickbox to show the incompatible ones only per user request?
Otherwise, I have no quick way to pick up a version that works for my current setup. I need to enumerate all of them to find out which version is compatible. It might be a bit tedious.
Also, I propose to change the messages a bit.
danielhollas
left a comment
There was a problem hiding this comment.
@unkcpz thanks so much. I don't have time to fully test this today, I'll try on Monday.
For now just a couple of minor comments on the code.
09299e4 to
7a87dca
Compare
|
After some thinking, I would propose the following:
@unkcpz and @danielhollas, let me know if you agree with that. I will then go ahead with the implementation. |
|
I fully agree with these, especially the first I proposed once. Please go ahead with it. |
|
@yakutovicha I agree with what you wrote and what we just discussed. Please go ahead and once a new version is ready I'll test it. This will be a great enhancement. |
We agreed to never display packages that are incompatible with the core requirements.
6e1cdac to
ecbb8ea
Compare
|
ready for testing @unkcpz and @danielhollas |
|
thanks a lot for the updates, I did a test, and looks much better. |
a774827 to
989262d
Compare
I don't fully agree with this, we have this functionality and it benefits for the user when need to keep it here. In essence, AiiDAlab encourages quick development so the pre-release should be common. I open issue #138 for further discussion or future implementing.
Addressed by 7576ec5, it is the ready to have feature, the version to be installed is in the install button. I think it is a but that only the installed app shows the version to be installed previously.
I think this is not a good idea, as a user look at the app store, I want to see that the app shown in the list have paralleled layout. If something is not shown in an app, would make me fill uncomfortable.
I have the same feeling about this, but instead might be more straightforward to separate by line. I try to add a border to the app manager widget. However, it looks very ugly. If you check carefully, there is already a horizontal line separate widgets. aiidalab-home/home/app_store.py Line 170 in 0b1c618
Addressed by 989262d by moving out the compatible not satisfied case out and turn off the ignore checkbox. |
aebe804 to
acbca31
Compare
for more information, see https://pre-commit.ci
danielhollas
left a comment
There was a problem hiding this comment.
@unkcpz thanks for the changes! We're getting very close. There's a bunch of general UI improvements that could still be done but we can do later.
One last thing I noticed, when you load the single app page, the Install button flashes several times before all the versions are loaded. I think the logic needs to be improved a bit, the button should only be enabled when all available versions are loaded. (for example, in the very beginning the button gets enabled with version "n/a"). (side note, the "refresh_state" function is crazy complicated now, would be good to add a bunch of tests and split it up in the future).
If this turns out to be too much more work, please just open an issue so we can go ahead with this.
|
@danielhollas thanks!
During validating the version, the widget should be in the |
| {% endfor %} | ||
| </ul> | ||
|
|
||
| The compatibility of dependencies may break by other apps, you can uninstall and install this app again to fix it |
There was a problem hiding this comment.
I add additional commit with a note here to show what to do if the incompatibility happened. Usually this caused by installing another package that has different dependencies and break the compatibility of this app.
There was a problem hiding this comment.
Really great idea! 👏 I suggest minor rewording. We need to make clear that only uninstalling the app does not help, because the dependencies will not be rolled back to the previous state. The user needs to:
- Uninstall the app that broke the environment.
- Reinstall the broken app.
| The compatibility of dependencies may break by other apps, you can uninstall and install this app again to fix it | |
| WARNING: Reinstalling previously installed dependencies may break already installed apps. If that happens, uninstall this app and reinstall the app that was broken. |
(You may want to adda <br> linebreak to make this nicer if necessary, I haven't tried)
When an incompatibility happens, pip actually prints a warning at the end. Also pip check will detect issues. I will open a separate issue for this, we should run pip check at the end of app install and surface any problems to the user.
There was a problem hiding this comment.
Oh, I misunderstood where this message is. It's in the template of the app that is incompatible. The sentence above should go to the DEPENDENCIES_INSTALL_INFO. Here I would say
| The compatibility of dependencies may break by other apps, you can uninstall and install this app again to fix it | |
| The compatibility issues may be caused by other installed apps. To solve this, you can re-install this app, and uninstall the app that caused the conflict. |
There was a problem hiding this comment.
Yes, there is. It shows when the warning box with details of which dependencies are not matched. This box only shown when the "App incompatible" is shown on the home page.
Changed.
danielhollas
left a comment
There was a problem hiding this comment.
During validating the version, the widget should be in the busy status. We have a _show_busy context manager to use.
Okay, great. Shall we use it then? I don't see any such change in the last two commits.
Otherwise I have only two wording suggestions.
| {% endfor %} | ||
| </ul> | ||
|
|
||
| The compatibility of dependencies may break by other apps, you can uninstall and install this app again to fix it |
There was a problem hiding this comment.
Really great idea! 👏 I suggest minor rewording. We need to make clear that only uninstalling the app does not help, because the dependencies will not be rolled back to the previous state. The user needs to:
- Uninstall the app that broke the environment.
- Reinstall the broken app.
| The compatibility of dependencies may break by other apps, you can uninstall and install this app again to fix it | |
| WARNING: Reinstalling previously installed dependencies may break already installed apps. If that happens, uninstall this app and reinstall the app that was broken. |
(You may want to adda <br> linebreak to make this nicer if necessary, I haven't tried)
When an incompatibility happens, pip actually prints a warning at the end. Also pip check will detect issues. I will open a separate issue for this, we should run pip check at the end of app install and surface any problems to the user.
| {% endfor %} | ||
| </ul> | ||
|
|
||
| The compatibility of dependencies may break by other apps, you can uninstall and install this app again to fix it |
There was a problem hiding this comment.
Oh, I misunderstood where this message is. It's in the template of the app that is incompatible. The sentence above should go to the DEPENDENCIES_INSTALL_INFO. Here I would say
| The compatibility of dependencies may break by other apps, you can uninstall and install this app again to fix it | |
| The compatibility issues may be caused by other installed apps. To solve this, you can re-install this app, and uninstall the app that caused the conflict. |
Ah, the change is in |
d9a0f74 to
5007e4c
Compare
danielhollas
left a comment
There was a problem hiding this comment.
Thanks @unkcpz. All good. I'll approve this once the aiidalab PR is ready and I can do the final testing.
|
@unkcpz I noticed an extra "Ignore" checkbox in the appstore for incompatible apps. Also, this checkbox would flash at the beginning when loading the "Manage app" page. I've fixed it in the last commit, please take a look. (I also changed the wording of warnings a little bit) |
danielhollas
left a comment
There was a problem hiding this comment.
Let's go! 🎉
Great work on this @unkcpz @yakutovicha, this is a great feature.
yakutovicha
left a comment
There was a problem hiding this comment.
I will also approve to satisfy github 😆
|
Cheers! 💪 thanks both! |
Replacement of #128
along with aiidalab/aiidalab#347 will fixes aiidalab/aiidalab#318
The compatibilities only checked for the installed app. If the user going to install the app that would potentially override the aiida-core version the installation will fail in AppManager but the user is not notified before they trigger the installation procedure.
In this PR, the check for the to-be-installed app is activated when the version is selected and will block the user to install the app that has incompatible "core" dependencies. The "core" dependencies now are only aiida-core.
The method
validate_strict_dependenciesis used to check that the aiida-core version of the container is not overridden by the app.If the "core" dependencies are not incompatible, the dependencies to be installed or updated will show in the info notes to remind the user what will be overridden.