Uninstall python package during app removal#515
Draft
danielhollas wants to merge 6 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #515 +/- ##
==========================================
- Coverage 72.72% 72.41% -0.31%
==========================================
Files 18 18
Lines 1672 1686 +14
==========================================
+ Hits 1216 1221 +5
- Misses 456 465 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
This proved a bit trickier then I thought. I think the current code works, but requires more testing so keeping in draft and moving to other more pressing things for now. No need to review yet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, when an app is being uninstalled, the only thing we do is to remove the app directory (the git repo in
/home/jovyan/apps/<app-name>). We don't remove the apps python package (if any) or any of its python dependencies.Removing apps python dependencies would be unsafe, since they can be shared with other apps, but we can safely remove the python package of the app itself, since keeping it around is (at the very least) confusing. This is what this PR implements.
Note, this is only done on a best-effort basis, since the app name might not be the same as python package name. Notably, this is the case for QeApp, where the app name is
quantum-espresso, while the python package isaiidalab-qe. Perhaps we can special case QeApp here?Closes #405
Test plan
Tested in CI on aiidalab-docker-stack repo: Test aiidalab pip-uninstall branch aiidalab-docker-stack#571
Manual testing