KarrLab/obj_tables

View on GitHub
examples/sbtab/SBtab.py

Summary

Maintainability
F
2 wks
Test Coverage

File SBtab.py has 1031 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Schema automatically generated at 2020-05-29 00:27:56

import obj_tables


Severity: Major
Found in examples/sbtab/SBtab.py - About 2 days to fix

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

    class Enzyme(obj_tables.Model):
        comment = obj_tables.StringAttribute(verbose_name='Comment')
        reference_name = obj_tables.StringAttribute(verbose_name='ReferenceName')
        reference_pub_med = obj_tables.StringAttribute(verbose_name='ReferencePubMed')
        reference_d_o_i = obj_tables.StringAttribute(verbose_name='ReferenceDOI')
    Severity: Major
    Found in examples/sbtab/SBtab.py and 1 other location - About 2 days to fix
    examples/sbtab/SBtab.py on lines 814..859

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

    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

    class QuantityInfo(obj_tables.Model):
        quantity_type = obj_tables.StringAttribute(verbose_name='QuantityType')
        symbol = obj_tables.StringAttribute(verbose_name='Symbol')
        unit = obj_tables.StringAttribute(verbose_name='Unit')
        constant = obj_tables.StringAttribute(verbose_name='Constant')
    Severity: Major
    Found in examples/sbtab/SBtab.py and 1 other location - About 2 days to fix
    examples/sbtab/SBtab.py on lines 220..265

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

    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

    class ReactionStoichiometry(obj_tables.Model):
        i_d = obj_tables.StringAttribute(verbose_name='ID')
        stoichiometry = obj_tables.StringAttribute(verbose_name='Stoichiometry')
        substrate = obj_tables.StringAttribute(verbose_name='Substrate')
        product = obj_tables.StringAttribute(verbose_name='Product')
    Severity: Major
    Found in examples/sbtab/SBtab.py and 1 other location - About 1 day to fix
    examples/sbtab/SBtab.py on lines 936..955

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

    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

    class FbcObjective(obj_tables.Model):
        i_d = obj_tables.StringAttribute(verbose_name='ID')
        name = obj_tables.StringAttribute(verbose_name='Name')
        s_b_m_l_fbc_type = obj_tables.StringAttribute(verbose_name='SBML:fbc:type')
        s_b_m_l_fbc_active = obj_tables.BooleanAttribute(verbose_name='SBML:fbc:active')
    Severity: Major
    Found in examples/sbtab/SBtab.py and 1 other location - About 1 day to fix
    examples/sbtab/SBtab.py on lines 994..1013

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

    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

    class StoichiometricMatrix(obj_tables.Model):
        reaction_i_d = obj_tables.StringAttribute(verbose_name='ReactionID')
        stoichiometry = obj_tables.StringAttribute(verbose_name='Stoichiometry')
        substrate = obj_tables.StringAttribute(verbose_name='Substrate')
        product = obj_tables.StringAttribute(verbose_name='Product')
    Severity: Major
    Found in examples/sbtab/SBtab.py and 2 other locations - About 6 hrs to fix
    examples/sbtab/SBtab.py on lines 646..663
    examples/sbtab/SBtab.py on lines 794..811

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

    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

    class Measurement(obj_tables.Model):
        sample = obj_tables.StringAttribute(verbose_name='Sample')
        time = obj_tables.StringAttribute(verbose_name='Time')
        unit = obj_tables.StringAttribute(verbose_name='Unit')
        value_type = obj_tables.StringAttribute(verbose_name='ValueType')
    Severity: Major
    Found in examples/sbtab/SBtab.py and 2 other locations - About 6 hrs to fix
    examples/sbtab/SBtab.py on lines 646..663
    examples/sbtab/SBtab.py on lines 774..791

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

    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

    class Definition(obj_tables.Model):
        component_name = obj_tables.StringAttribute(verbose_name='ComponentName')
        component_type = obj_tables.StringAttribute(verbose_name='ComponentType')
        is_part_of = obj_tables.StringAttribute(verbose_name='IsPartOf')
        format = obj_tables.StringAttribute(verbose_name='Format')
    Severity: Major
    Found in examples/sbtab/SBtab.py and 2 other locations - About 6 hrs to fix
    examples/sbtab/SBtab.py on lines 774..791
    examples/sbtab/SBtab.py on lines 794..811

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

    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

    class Position(obj_tables.Model):
        element = obj_tables.StringAttribute(verbose_name='Element')
        position_x = obj_tables.FloatAttribute(verbose_name='PositionX')
        position_y = obj_tables.FloatAttribute(verbose_name='PositionY')
    
    
    Severity: Major
    Found in examples/sbtab/SBtab.py and 2 other locations - About 4 hrs to fix
    examples/sbtab/SBtab.py on lines 1016..1029
    examples/sbtab/SBtab.py on lines 1032..1045

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

    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

    class SparseMatrix(obj_tables.Model):
        row_i_d = obj_tables.StringAttribute(verbose_name='RowID')
        column_i_d = obj_tables.StringAttribute(verbose_name='ColumnID')
        value = obj_tables.FloatAttribute(verbose_name='Value')
    
    
    Severity: Major
    Found in examples/sbtab/SBtab.py and 2 other locations - About 4 hrs to fix
    examples/sbtab/SBtab.py on lines 1016..1029
    examples/sbtab/SBtab.py on lines 1100..1113

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

    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

    class SparseMatrixOrdered(obj_tables.Model):
        row_number = obj_tables.IntegerAttribute(verbose_name='RowNumber')
        column_number = obj_tables.IntegerAttribute(verbose_name='ColumnNumber')
        value = obj_tables.FloatAttribute(verbose_name='Value')
    
    
    Severity: Major
    Found in examples/sbtab/SBtab.py and 2 other locations - About 4 hrs to fix
    examples/sbtab/SBtab.py on lines 1032..1045
    examples/sbtab/SBtab.py on lines 1100..1113

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

    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

    class PbConfig(obj_tables.Model):
        option = obj_tables.StringAttribute(verbose_name='Option')
        value = obj_tables.StringAttribute(verbose_name='Value')
    
        class Meta(obj_tables.Model.Meta):
    Severity: Major
    Found in examples/sbtab/SBtab.py and 2 other locations - About 3 hrs to fix
    examples/sbtab/SBtab.py on lines 1048..1059
    examples/sbtab/SBtab.py on lines 1062..1073

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

    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

    class SparseMatrixRow(obj_tables.Model):
        row_i_d = obj_tables.StringAttribute(verbose_name='RowID')
        row_string = obj_tables.StringAttribute(verbose_name='RowString')
    
        class Meta(obj_tables.Model.Meta):
    Severity: Major
    Found in examples/sbtab/SBtab.py and 2 other locations - About 3 hrs to fix
    examples/sbtab/SBtab.py on lines 862..873
    examples/sbtab/SBtab.py on lines 1062..1073

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

    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

    class SparseMatrixColumn(obj_tables.Model):
        column_i_d = obj_tables.StringAttribute(verbose_name='ColumnID')
        column_string = obj_tables.StringAttribute(verbose_name='ColumnString')
    
        class Meta(obj_tables.Model.Meta):
    Severity: Major
    Found in examples/sbtab/SBtab.py and 2 other locations - About 3 hrs to fix
    examples/sbtab/SBtab.py on lines 862..873
    examples/sbtab/SBtab.py on lines 1048..1059

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

    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