Open adamcantor22 opened 2 years ago
thoughts @cleme ?
I don't understand why there should be "two versions of the study" in the studies directory. Move older stuff out of the current MMEDS directory to some backup folder, and keep only what is being properly stored through MMEDS. So any data under the MMEDS directory should be only accessible through MMEDS functionality (i.e. copying manually into the sequencing runs or studies directories in minerva should be discouraged as much as possible).
As for the issue of functionality to delete studies through MMEDS: yes, we need it because there might be cases in which a study is incorrectly uploaded and you want to delete and upload properly. The "right" way to do this is through MMEDS, and not manually. Goes without saying, delete functionality should always have big warnings before it allows you to delete anything.
Great, that was one of my questions, I'll move them to a backup folder. The slight caveat with that, since there is no delete option at present and we haven't wiped the database, is that those studies still have database documents that think they're in the actual study folder. However, assuming in future we will need to make changes to the document schema (as we were discussing about #418 ), we will then be able to dump/load the current studies and wipe the database, and this will no longer be an issue. Temporarily assigning this to 0.9, subject to change.
I've finally figured out how to access the mongo documents on the command line. As such, I can now delete both documents and files from server locations. While this is far from ideal, it means it is at least possible to fully delete studies or sequencing runs.
Commands to access mongo documents:
mongo
(opens mongo shell)use mmeds_web01
db.auth("{username}", "{password}")
look at the appropriate secrets for username and passwordcoll = db.m_m_e_d_s_doc
coll.find({args})
args are the query, don't include to see all docs
Is your feature request related to a problem? Please describe. There is no way that either users or us can currently delete data from the database or server, other than a database wipe or a manual delete from the server directories (which would cause a disconnect between server and database). Is the deletion of data, in any case, something we want to be possible?
Describe the solution you'd like TBD. Would like to have a discussion about this to figure out if it's something we're even interested in.
Describe alternatives you've considered There have been issues adjacent to this in the past: #43 #103 #257 But they were all about specific instances and were more or less resolved.
Additional context I'm thinking about this because I'm currently working on #353 reloading old studies. As I reload studies, we end up with two versions of the study in the studies directory, an "original" with the old format, and a "reupload" with the new format. It may end up being confusing in the future to have these both. So I'm thinking they should probably be moved to some kind of "old study format" folder for posterity, but it's possible we'd prefer to delete them.