KarrLab/intro_to_wc_modeling

View on GitHub

Showing 93 of 135 total issues

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

        if time_max < 0 or numpy.ceil(time_max) != time_max:
            raise ValueError('`time_max` must be a non-negative integer'
intro_to_wc_modeling/concepts_skills/software_engineering/unit_testing/core.py on lines 50..51
intro_to_wc_modeling/concepts_skills/software_engineering/unit_testing/core.py on lines 52..53

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

        if time_max < 0 or numpy.ceil(time_max) != time_max:
            raise ValueError('`time_max` must be a non-negative integer')
intro_to_wc_modeling/concepts_skills/software_engineering/unit_testing/core.py on lines 50..51
intro_to_wc_modeling/concepts_skills/software_engineering/unit_testing/core.py on lines 117..118

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

    analysis.plot(
        model=submdl,
        time=time,
        yDatas={'Volume': volume},
        fileName=os.path.join(output_directory, 'Volume.png')
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 143..147
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 150..154
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 157..161
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 164..168
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/submodel_simulation.py on lines 137..141

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

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

            axes[0].plot(t, m[:, i_trajectory], color=(gray, gray, gray))
intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 860..860

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

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

    analysis.plot(
        model=submdl,
        time=time,
        yDatas={'Growth': growth},
        fileName=os.path.join(output_directory, 'Growth.png')
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 143..147
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 150..154
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 157..161
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 164..168
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/submodel_simulation.py on lines 130..134

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

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

    analysis.plot(
        model=mdl,
        time=time,
        yDatas={'Volume': volume},
        fileName=os.path.join(output_directory, 'Volume.png')
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 150..154
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 157..161
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 164..168
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/submodel_simulation.py on lines 130..134
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/submodel_simulation.py on lines 137..141

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

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

    analysis.plot(
        model=mdl,
        time=time,
        yDatas={'Protein': totalProt},
        fileName=os.path.join(output_directory, 'Total-protein.png')
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 143..147
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 150..154
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 157..161
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/submodel_simulation.py on lines 130..134
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/submodel_simulation.py on lines 137..141

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

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

    analysis.plot(
        model=mdl,
        time=time,
        yDatas={'Growth': growth},
        fileName=os.path.join(output_directory, 'Growth.png')
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 143..147
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 157..161
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 164..168
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/submodel_simulation.py on lines 130..134
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/submodel_simulation.py on lines 137..141

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

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

    analysis.plot(
        model=mdl,
        time=time,
        yDatas={'RNA': totalRna},
        fileName=os.path.join(output_directory, 'Total-RNA.png')
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 143..147
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 150..154
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/simulation.py on lines 164..168
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/submodel_simulation.py on lines 130..134
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/submodel_simulation.py on lines 137..141

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

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

            axes[1].plot(t, n[:, i_trajectory], color=(gray, gray, gray))
intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 859..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 33.

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

            (self.K1dhap * (1 + self.ADP/self.K1adp + self.ATP / self.K1atp + self.F16BP / self.K1f16bp)
Severity: Minor
Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 35 mins to fix
intro_to_wc_modeling/cell_modeling/model_composition.py on lines 542..542

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

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

                Concentration(compartment='e', value=float(ws.cell(row=iRow, column=9).value or 0)),
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/model.py on lines 707..707

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

                Concentration(compartment='c', value=float(ws.cell(row=iRow, column=8).value or 0)),
intro_to_wc_modeling/cell_modeling/simulation/multi_algorithm/model.py on lines 708..708

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

Severity
Category
Status
Source
Language