DeepRegNet/DeepReg

View on GitHub

Showing 89 of 113 total issues

Avoid deeply nested control flow statements.
Open

                    if case in file:
                        os.chdir(os.path.join(path_to_train, folder))
                        source = file
                        destination = os.path.join(path_to_test, folder)
                        shutil.move(source, destination)
Severity: Major
Found in demos/paired_ct_lung/demo_data.py - About 45 mins to fix

    Function calculate_metrics has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def calculate_metrics(
    Severity: Minor
    Found in deepreg/util.py - About 45 mins to fix

      Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(
      Severity: Minor
      Found in deepreg/model/backbone/global_net.py - About 45 mins to fix

        Function deconv_output_padding has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def deconv_output_padding(
        Severity: Minor
        Found in deepreg/model/layer_util.py - About 35 mins to fix

          Function build_checkpoint_callback has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def build_checkpoint_callback(
          Severity: Minor
          Found in deepreg/callback.py - About 35 mins to fix

            Function tile_slices has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def tile_slices(img_paths, save_path="", fname=None, slice_inds=None, col_titles=None):
            Severity: Minor
            Found in deepreg/vis.py - About 35 mins to fix

              Function build_output_block has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def build_output_block(
              Severity: Minor
              Found in deepreg/model/backbone/u_net.py - About 35 mins to fix

                Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def __init__(
                Severity: Minor
                Found in deepreg/dataset/preprocess.py - About 35 mins to fix

                  Function train_step has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def train_step(warper, weights, optimizer, mov, fix) -> tuple:
                  Severity: Minor
                  Found in demos/classical_mr_prostate_nonrigid/demo_register.py - About 35 mins to fix

                    Function register has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def register(
                    Severity: Minor
                    Found in deepreg/registry.py - About 35 mins to fix

                      Function build_output_block has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def build_output_block(
                      Severity: Minor
                      Found in deepreg/model/backbone/local_net.py - About 35 mins to fix

                        Function validate_images_and_labels has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def validate_images_and_labels(
                        Severity: Minor
                        Found in deepreg/dataset/loader/interface.py - About 35 mins to fix

                          Function build_config has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def build_config(
                          Severity: Minor
                          Found in deepreg/train.py - About 35 mins to fix

                            Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def __init__(
                            Severity: Minor
                            Found in deepreg/model/layer.py - About 35 mins to fix

                              Function build_dataset has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def build_dataset(
                              Severity: Minor
                              Found in deepreg/util.py - About 35 mins to fix

                                Function gif_tile_slices has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def gif_tile_slices(img_paths, save_path=None, size=(2, 2), fname=None, interval=50):
                                Severity: Minor
                                Found in deepreg/vis.py - About 35 mins to fix

                                  Function gen_rand_ddf has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def gen_rand_ddf(
                                  Severity: Minor
                                  Found in deepreg/dataset/preprocess.py - About 35 mins to fix

                                    Function train_step has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def train_step(grid, weights, optimizer, mov, fix) -> object:
                                    Severity: Minor
                                    Found in demos/classical_ct_headneck_affine/demo_register.py - About 35 mins to fix

                                      Function move_files_into_correct_path has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      def move_files_into_correct_path(
                                      Severity: Minor
                                      Found in demos/unpaired_ct_lung/demo_data.py - About 35 mins to fix

                                        Function _deconv_output_padding has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        def _deconv_output_padding(
                                        Severity: Minor
                                        Found in deepreg/model/layer_util.py - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language