KarrLab/wc_sim

View on GitHub
examples/transcription_translation_hybrid_model/run_with_wc_sim.py

Summary

Maintainability
C
1 day
Test Coverage

Function plot has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def plot(model, results, filename):
    # get expected results
    c = model.compartments.get_one(id='c')

    species_type = model.species_types.get_one(id='rna')
Severity: Minor
Found in examples/transcription_translation_hybrid_model/run_with_wc_sim.py - About 1 hr to fix

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

        axes1[1].plot([0, time[-1] / 3600], [avg, avg], label='Avg: {}'.format(exp_avg_prot))
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 65..65

    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

        axes1[0].plot([0, time[-1] / 3600], [avg, avg], label='Avg: {}'.format(exp_avg_rna))
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 75..75

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

        axes2[1].set_xlim((time[0] / 3600, time[-1] / 3600))
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 66..66
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 76..76
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 84..84
    examples/translation_metabolism_hybrid_model/run.py on lines 109..109
    examples/translation_metabolism_hybrid_model/run.py on lines 117..117
    examples/translation_metabolism_hybrid_model/run.py on lines 125..125

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

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

        axes2[0].set_xlim((time[0] / 3600, time[-1] / 3600))
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 66..66
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 76..76
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 92..92
    examples/translation_metabolism_hybrid_model/run.py on lines 109..109
    examples/translation_metabolism_hybrid_model/run.py on lines 117..117
    examples/translation_metabolism_hybrid_model/run.py on lines 125..125

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

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

        axes1[0].set_xlim((time[0] / 3600, time[-1] / 3600))
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 76..76
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 84..84
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 92..92
    examples/translation_metabolism_hybrid_model/run.py on lines 109..109
    examples/translation_metabolism_hybrid_model/run.py on lines 117..117
    examples/translation_metabolism_hybrid_model/run.py on lines 125..125

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

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

        axes1[1].set_xlim((time[0] / 3600, time[-1] / 3600))
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 66..66
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 84..84
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 92..92
    examples/translation_metabolism_hybrid_model/run.py on lines 109..109
    examples/translation_metabolism_hybrid_model/run.py on lines 117..117
    examples/translation_metabolism_hybrid_model/run.py on lines 125..125

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

    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

        axes1[1].plot(time / 3600, prot, label='<{0:.0f}>'.format(avg))
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 64..64

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

    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

        axes1[0].plot(time / 3600, rna, label='<{0:.1f}>'.format(avg))
    examples/transcription_translation_hybrid_model/run_with_wc_sim.py on lines 74..74

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

    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