KarrLab/datanator

View on GitHub
datanator/data_source/protein_localization/victoria_insert_archaea.py

Summary

Maintainability
F
2 wks
Test Coverage

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

    def __init__(self,

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

        def build_obs(self, data, i):
            """Build observation objects from obj.
            Go into observations collection.
            Args:
                data (:obj:`Obj`): source object.
    datanator/data_source/protein_localization/victoria_insert_neg_wo_outer_membrane.py on lines 54..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 624.

    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

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

            for i in range(len(data)):
                #update entity collection
                con_0={"identifiers":{"$elemMatch":{"namespace":"Seq_ID","value":str(data.iloc[i,0])[str(data.iloc[i,0]).find("W"):str(data.iloc[i,0]).rfind("|")]}}}
                entity = self.build_entity(data,i)
                self.entity_col.update_one(con_0,{"$set": {"type": entity["type"],
    datanator/data_source/protein_localization/victoria_insert_neg_wo_outer_membrane.py on lines 114..144

    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 546.

    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

        def build_entity(self, data, i):
            """Build entity object from data.
            Go into entity collection
    
            Args:
    datanator/data_source/protein_localization/victoria_insert_neg_wo_outer_membrane.py on lines 27..51

    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 186.

    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

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

        def __init__(self,
                     MongoDB=None,
                     db=None,
                     collection=None,
                     max_entries=float('inf'),
    datanator/data_source/protein_localization/victoria_insert_experimental_protein.py on lines 7..25
    datanator/data_source/protein_localization/victoria_insert_neg_wo_outer_membrane.py on lines 7..25
    datanator/data_source/protein_localization/victoria_insert_protein_atlas.py on lines 10..28

    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 114.

    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 11 locations. Consider refactoring.
    Open

    def main():
        conf=config.Victoria()
        conf_main = config.Config()
        username = conf.USERNAME
        password = conf.PASSWORD
    datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 314..327
    datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 376..389
    datanator/data_source/protein_half_lives/victoria_parse_quantification_budding_yeast_proteome.py on lines 158..170
    datanator/data_source/protein_half_lives/victoria_parse_yeast_global_proteome_turnover.py on lines 316..329
    datanator/data_source/protein_localization/experimental.py on lines 63..74
    datanator/data_source/protein_localization/victoria_insert_experimental_protein.py on lines 182..193
    datanator/data_source/protein_localization/victoria_insert_neg_wo_outer_membrane.py on lines 148..159
    datanator/data_source/protein_localization/victoria_insert_protein_atlas.py on lines 272..283
    datanator/data_source/rna_localization/victoria_parse_LncAtlas.py on lines 224..236
    datanator/parse_metabolite_concentration.py on lines 44..55

    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 73.

    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