Conversation
|
@chris-s-friedman Can you test this reimplemented delete function to see if it runs better? |
chris-s-friedman
left a comment
There was a problem hiding this comment.
i had an issue where it stopped deleting things after 248 sequencing experiments got deleted
kf_utils/dataservice/delete.py
Outdated
| delete_kfids(host, STUDIES, [study_id], safety_check=safety_check) | ||
| ) | ||
| kfids = yield_kfids(host, endpoint, {"study_id": study_id}) | ||
| delete_kfids(host, kfids, safety_check=safety_check) |
There was a problem hiding this comment.
delete_kfids prints how many things are being deleted at the current endpoint. there should be a statement before deleting printing what endpoint is currently being deleted e.g:
| delete_kfids(host, kfids, safety_check=safety_check) | |
| print(f"Deleting kfids from {endpoint}.") | |
| delete_kfids(host, kfids, safety_check=safety_check) |
Otherwise it's not clear where in the process of deleting the script is.
7c15130 to
f030fa6
Compare
chris-s-friedman
left a comment
There was a problem hiding this comment.
I'm still getting an issue where delete_kfids gets to the 248th item and then stops.
kf_utils/dataservice/delete.py
Outdated
| print(f"Finding all {endpoint}.") | ||
| kfids = yield_kfids(host, endpoint, {}, show_progress=True) | ||
| print(f"Deleting all {endpoint}.") | ||
| delete_kfids(host, kfids, safety_check=safety_check) |
There was a problem hiding this comment.
I'm now getting
Deleting all studies from http://localhost:5000
Finding all read-groups.
Deleting all read-groups.
oFinding all read-group-genomic-files.
Deleting all read-group-genomic-files.
oFinding all sequencing-experiments.
Deleting all sequencing-experiments.
oFinding all sequencing-experiment-genomic-files.
Deleting all sequencing-experiment-genomic-files.
oFinding all genomic-files.
Deleting all genomic-files.
i'm thinking that leading o is printed from delete_kfids?
maybe something like below so that we don't try to delete nothing?
| print(f"Finding all {endpoint}.") | |
| kfids = yield_kfids(host, endpoint, {}, show_progress=True) | |
| print(f"Deleting all {endpoint}.") | |
| delete_kfids(host, kfids, safety_check=safety_check) | |
| print(f"Finding all {endpoint}.") | |
| kfids = yield_kfids(host, endpoint, {}, show_progress=True) | |
| if len(kfids) > 0: | |
| print(f"Deleting all {endpoint}.") | |
| delete_kfids(host, kfids, safety_check=safety_check) | |
| else: | |
| print(f"Nothing found at {endpoint}.") |
There was a problem hiding this comment.
ok try again. you'll have to install dependencies again because I added a new one for cleaner scraping progress display
0d8a35b to
07f25e0
Compare
## Release 0.4.0 ### Summary - Emojis: ♻️ x1, ⚡ x2, ✅ x1, 🧐 x1, ✨ x2 - Categories: Additions x2, Other Changes x5 ### New features and changes - [#36](#36) - ⚡♻️ Consolidate and speed up delete method - [089b62f](089b62f) by [fiendish](https://github.com/fiendish) - [#35](#35) - ✅ Reduce size of some tests - [b143fd9](b143fd9) by [fiendish](https://github.com/fiendish) - [#34](#34) - ⚡ Only patch descendant visibility if needed (also adds dry_run) - [196ee2b](196ee2b) by [fiendish](https://github.com/fiendish) - [#33](#33) - 🧐 Populate starting entities in descendant tree - [a696fc5](a696fc5) by [fiendish](https://github.com/fiendish) - [#32](#32) - ✨ Add whole entity hiding function to only hide visible entities - [77bc428](77bc428) by [fiendish](https://github.com/fiendish) - [#31](#31) - ✨ Add yielding entity contents from kfids - [7420fa6](7420fa6) by [fiendish](https://github.com/fiendish)
No description provided.