Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-2961

Delete unnecessary code related to remove methods

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: TVB Framework
    • Labels:
      None

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              robert.vincze Robert Francisc Vincze
              Reporter:
              robert.vincze Robert Francisc Vincze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 4 hours Time Not Required
                  1d 4h