Details
-
Task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.4
-
None
-
VBC Sprint 13
-
6.3 SCAI Viewer Design
Description
The remove_project_structure method is almost useless. It is used inside of the remove_project method and in a lot of tests. It is supossed to delete the storage part of a project, but:
In the tests by the time it is called in the teardown methods, everything is already deleted.
When it is called from remove_project the only things that it still has is the folder with the images and the xml file, so those could be deleted separately.
The remove_operation_data method is supposed to delete the an operation folder with all its contents. However, when this method is called (either through deleting a project or an operation) only the view model h5 file is still there, the datatype h5 file is deleted before.
The remove_files method is used for example to delete the files that make up the connectivity (both zip and csv) from the operation folder (like areas, centres etc.).
The remove_datatype_file is redundant and should be deleted. It justs delete a h5 file and used only when removing a datatype. If we don't call it, then the remove_operation_data which is called later will be remove both h5 files anyway.
The remove_image_metadata deletes the .xml file associated with each image. The image itself is deleted before calling this method. I suggest deleting both in this method.
I will make a task for refactoring this methods and I will copy this comment there.