nigroup/nideep

View on GitHub
nideep/datasets/washington-rgbd/washington_rgbd.py

Summary

Maintainability
F
1 wk
Test Coverage

File washington_rgbd.py has 318 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import os
import numpy as np
import cv2
import argparse
import shutil
Severity: Minor
Found in nideep/datasets/washington-rgbd/washington_rgbd.py - About 3 hrs to fix

    Function train_test_split_eitel_stereo_rgb has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
    Open

        def train_test_split_eitel_stereo_rgb(self, seed=1000, rotation_index=10, train_output='', test_output=''):
            self.logger.info('Splitting train/test for stereo rgb')
            washington_aggredated_df = self.aggregate_frame_data()
    
            dicts = []
    Severity: Minor
    Found in nideep/datasets/washington-rgbd/washington_rgbd.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function interpolate_poses has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def interpolate_poses(self, data_frame):
            if os.path.isfile(self.csv_interpolated_default):
                self.logger.info('reading from ' + self.csv_interpolated_default)
                return pd.read_csv(self.csv_interpolated_default)
    
    
    Severity: Minor
    Found in nideep/datasets/washington-rgbd/washington_rgbd.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function load_metadata has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def load_metadata(self):
            if os.path.isfile(self.csv_default):
                self.logger.info('reading from ' + self.csv_default)
                return pd.read_csv(self.csv_default)
    
    
    Severity: Minor
    Found in nideep/datasets/washington-rgbd/washington_rgbd.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function combine_viewpoints has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        def combine_viewpoints(self, angle, video_no, should_include_depth, output_path, split_method='random'):
    
            def join(df, output_path):
                for i in range(len(df.index)):
                    current_original_file_df = df.iloc[[i]]
    Severity: Minor
    Found in nideep/datasets/washington-rgbd/washington_rgbd.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function train_test_split_eitel has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

        def train_test_split_eitel(train_info_df, seed=1000, train_output='', test_output=''):
            if train_output != '' and not os.path.isdir(os.path.split(train_output)[0]):
                os.makedirs(os.path.split(train_output)[0])
            if test_output != '' and not os.path.isdir(os.path.split(test_output)[0]):
                os.makedirs(os.path.split(test_output)[0])
    Severity: Minor
    Found in nideep/datasets/washington-rgbd/washington_rgbd.py - About 55 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Avoid deeply nested control flow statements.
    Open

                            if original_item.pose > rotated_item.pose:
                                (original_item, rotated_item) = (rotated_item, original_item)
    
    
    Severity: Major
    Found in nideep/datasets/washington-rgbd/washington_rgbd.py - About 45 mins to fix

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

          def combine_viewpoints(self, angle, video_no, should_include_depth, output_path, split_method='random'):
      Severity: Minor
      Found in nideep/datasets/washington-rgbd/washington_rgbd.py - About 35 mins to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                for category in categories:
                    # Select 1 instance for test and insert the whole category to test set
                    category_df = input_df[input_df.category == category]
                    max_instance = np.max(category_df.instance_number)
                    test_instance = np.random.randint(max_instance) + 1
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 1 other location - About 1 day to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 335..345

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 163.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                for category in categories:
                    # Select 1 category for test and insert the whole category to test set
                    category_df = train_info_df[train_info_df.category == category]
                    max_instance = np.max(category_df.instance_number)
                    test_instance = np.random.randint(max_instance) + 1
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 1 other location - About 1 day to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 404..414

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 163.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

                    current_loc_location = raw_loc_df[(raw_loc_df.category == current_category)
                                                      & (raw_loc_df.instance_number == current_instance_number)
                                                      & (raw_loc_df.video_no == current_video_no)
                                                      & (raw_loc_df.frame_no == current_frame_no)].location.values[0]
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 2 other locations - About 3 hrs to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 169..172
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 174..178

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 71.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

                    current_depthcrop_location = raw_depth_df[(raw_depth_df.category == current_category)
                                                              & (raw_depth_df.instance_number == current_instance_number)
                                                              & (raw_depth_df.video_no == current_video_no)
                                                              & (raw_depth_df.frame_no == current_frame_no)].location.values[0]
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 2 other locations - About 3 hrs to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 174..178
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 182..185

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 71.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

                    try:
                        current_maskcrop_location = raw_maskcrop_df[(raw_maskcrop_df.category == current_category)
                                                                    & (raw_maskcrop_df.instance_number == current_instance_number)
                                                                    & (raw_maskcrop_df.video_no == current_video_no)
                                                                    & (raw_maskcrop_df.frame_no == current_frame_no)].location.values[0]
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 2 other locations - About 3 hrs to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 169..172
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 182..185

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 71.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                if train_output != '' and not os.path.isdir(os.path.split(train_output)[0]):
                    os.makedirs(os.path.split(train_output)[0])
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 3 other locations - About 3 hrs to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 325..326
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 327..328
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 396..397

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                if train_output != '' and not os.path.isdir(os.path.split(train_output)[0]):
                    os.makedirs(os.path.split(train_output)[0])
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 3 other locations - About 3 hrs to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 327..328
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 394..395
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 396..397

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                if test_output != '' and not os.path.isdir(os.path.split(test_output)[0]):
                    os.makedirs(os.path.split(test_output)[0])
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 3 other locations - About 3 hrs to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 325..326
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 394..395
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 396..397

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

                if test_output != '' and not os.path.isdir(os.path.split(test_output)[0]):
                    os.makedirs(os.path.split(test_output)[0])
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 3 other locations - About 3 hrs to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 325..326
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 327..328
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 394..395

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                if os.path.isfile(self.csv_default):
                    self.logger.info('reading from ' + self.csv_default)
                    return pd.read_csv(self.csv_default)
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 1 other location - About 1 hr to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 104..106

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 44.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                if os.path.isfile(self.csv_interpolated_default):
                    self.logger.info('reading from ' + self.csv_interpolated_default)
                    return pd.read_csv(self.csv_interpolated_default)
        Severity: Major
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 1 other location - About 1 hr to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 36..38

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 44.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                if train_df.shape[0] + test_df.shape[0] == train_info_df.shape[0]:
        Severity: Minor
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 1 other location - About 55 mins to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 416..416

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 37.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                if train_df.shape[0] + test_df.shape[0] == input_df.shape[0]:
        Severity: Minor
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 1 other location - About 55 mins to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 347..347

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 37.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                train, test = train_test_split(data_frame, test_size=0.2) if split_method == 'random' \
                    else self.train_test_split_eitel(data_frame)
        Severity: Minor
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 1 other location - About 40 mins to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 297..298

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 34.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                train, test = train_test_split(df, test_size=0.2) if split_method == 'random' \
                    else self.train_test_split_eitel(df)
        Severity: Minor
        Found in nideep/datasets/washington-rgbd/washington_rgbd.py and 1 other location - About 40 mins to fix
        nideep/datasets/washington-rgbd/washington_rgbd.py on lines 276..277

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 34.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        There are no issues that match your filters.

        Category
        Status