KarrLab/intro_to_wc_modeling

View on GitHub
intro_to_wc_modeling/cell_modeling/model_composition.py

Summary

Maintainability
F
3 wks
Test Coverage
A
100%

File model_composition.py has 614 lines of code (exceeds 250 allowed). Consider refactoring.
Open

""" Model composition tutorial

- Glycolysis model (Teusink et al., 2000)
- Glycerol synthesis model (Cronwright et al., 2002)

Severity: Major
Found in intro_to_wc_modeling/cell_modeling/model_composition.py - About 1 day to fix

    GlycolysisModel has 35 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class GlycolysisModel(object):
        """ Glycolysis model (Teusink et al., 2000)
    
        Based on the `version from JWS Online <http://jjj.biochem.sun.ac.za/models/teusink/>`_
    
    
    Severity: Minor
    Found in intro_to_wc_modeling/cell_modeling/model_composition.py - About 4 hrs to fix

      Function main has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def main(out_dir=None):
          """ Simulate individual models and combined model, plot results, and save plots
      
          Args:
              out_dir (:obj:`str`, optional): path to directory to save results
      Severity: Minor
      Found in intro_to_wc_modeling/cell_modeling/model_composition.py - About 1 hr to fix

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

                return (self.gR*self.VmPFK*x[3]*(-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)*(1 + x[3]/self.KmPFKF6P + (-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)/((2 - 8*self.KeqAK)*self.KmPFKATP) + (self.gR*x[3]*(-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5))/((2 - 8*self.KeqAK)*self.KmPFKATP*self.KmPFKF6P)))/((2 - 8*self.KeqAK)*self.KmPFKATP*self.KmPFKF6P*((self.L0*(1 + (self.CPFKF26BP*self.F26BP)/self.KPFKF26BP + (self.CPFKF16BP*x[2])/self.KPFKF16BP)**2*(1 + (2*self.CPFKAMP*self.KeqAK*(self.SUMAXP - (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)**2)/((-1 + 4*self.KeqAK)*self.KPFKAMP*(self.SUMAXP - x[12] + 4*self.KeqAK*x[12] - (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)))**2*(1 + (self.CiPFKATP*(-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5))/((2 - 8*self.KeqAK)*self.KiPFKATP))**2*(1 + (self.CPFKATP*(-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5))/((2 - 8*self.KeqAK)*self.KmPFKATP))**2)/((1 + self.F26BP/self.KPFKF26BP + x[2]/self.KPFKF16BP)**2*(1 + (2*self.KeqAK*(self.SUMAXP - (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)**2)/((-1 + 4*self.KeqAK)*self.KPFKAMP*(self.SUMAXP - x[12] + 4*self.KeqAK*x[12] - (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)))**2*(1 + (-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)/((2 - 8*self.KeqAK)*self.KiPFKATP))**2) + (1 + x[3]/self.KmPFKF6P + (-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)/((2 - 8*self.KeqAK)*self.KmPFKATP) + (self.gR*x[3]*(-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5))/((2 - 8*self.KeqAK)*self.KmPFKATP*self.KmPFKF6P))**2))
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 4 days to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 292..292

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

        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

                return (self.VmPGK*((self.KeqPGK*x[1]*(self.SUMAXP - (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5))/(1 - 4*self.KeqAK) - (x[9]*(-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5))/(2 - 8*self.KeqAK)))/(self.KmPGKATP*self.KmPGKP3G*(1 + x[1]/self.KmPGKBPG + x[9]/self.KmPGKP3G)*(1 + (self.SUMAXP - (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)/((1 - 4*self.KeqAK)*self.KmPGKADP) + (-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)/((2 - 8*self.KeqAK)*self.KmPGKATP)))
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 4 days to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 271..272

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

        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

                return (self.VmGLK*(-((x[4]*(self.SUMAXP - (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)) /
                                      ((1 - 4*self.KeqAK)*self.KeqGLK)) + (x[5]*(-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5))/(2 - 8*self.KeqAK)))/(self.KmGLKATP*self.KmGLKGLCi*(1 + x[4]/self.KmGLKG6P + x[5]/self.KmGLKGLCi)*(1 + (self.SUMAXP - (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)/((1 - 4*self.KeqAK)*self.KmGLKADP) + (-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)/((2 - 8*self.KeqAK)*self.KmGLKATP)))
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 4 days to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 307..307

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

        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

                return (self.VmPYK*((x[10]*(self.SUMAXP - (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5))/(1 - 4*self.KeqAK) - ((-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)*x[11])/((2 - 8*self.KeqAK)*self.KeqPYK)))/(self.KmPYKADP*self.KmPYKPEP*(1 + (self.SUMAXP - (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)/((1 - 4*self.KeqAK)*self.KmPYKADP) + (-self.SUMAXP + x[12] - 4*self.KeqAK*x[12] + (self.SUMAXP**2 - 2*self.SUMAXP*x[12] + 8*self.KeqAK*self.SUMAXP*x[12] + x[12]**2 - 4*self.KeqAK*x[12]**2)**0.5)/((2 - 8*self.KeqAK)*self.KmPYKATP))*(1 + x[10]/self.KmPYKPEP + x[11]/self.KmPYKPYR))
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 1 day to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 271..271

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

        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 v_9(self, x):
                # Phosphoglycerate mutase
                # P3G <=> P2G
                return (self.VmPGM*(-(x[8]/self.KeqPGM) + x[9]))/(self.KmPGMP3G*(1 + x[8]/self.KmPGMP2G + x[9]/self.KmPGMP3G))
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 6 hrs to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 274..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 102.

        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 v_2(self, x):
                # Glucose-6-phosphate isomerase
                # G6P <=> F6P
                return (self.VmPGI*(-(x[3]/self.KeqPGI) + x[4]))/(self.KmPGIG6P*(1 + x[3]/self.KmPGIF6P + x[4]/self.KmPGIG6P))
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 6 hrs to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 309..312

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

        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 dNADH_dt(self, x):
                return 1.0 * self.v_7(x) + 3.0 * self.v_13(x) - 1.0 * self.v_15(x) - 1.0 * self.v_16(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 4 hrs to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 372..373

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

        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 dNAD_dt(self, x):
                return 1.0 * self.v_15(x) + 1.0 * self.v_16(x) - 1.0 * self.v_7(x) - 3.0 * self.v_13(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 4 hrs to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 375..376

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

        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 dACE_dt(self, x):
                return 1.0 * self.v_12(x) - 1.0 * self.v_15(x) - 2.0 * self.v_13(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 2 hrs to fix
        intro_to_wc_modeling/cell_modeling/model_composition.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 58.

        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 dTRIO_dt(self, x):
                return 2.0 * self.v_6(x) - 1.0 * self.v_16(x) - 1.0 * self.v_7(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 2 hrs to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 354..355

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

        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

                dx_dt[7] += 1.0 * self.glycolysis_model.v_16(x[0:-1]) - 1.0 * self.v_18(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 2 hrs to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 692..692

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

        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

                dx_dt[13] += 1.0 * self.glycolysis_model.v_16(x[0:-1]) - 1.0 * self.v_18(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 2 hrs to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 691..691

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

        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

                return -((self.VmADH*(self.ETOH*x[6] - (x[0]*x[7])/self.KeqADH))/(self.KiADHNAD*self.KmADHETOH*(1 + (self.ETOH*self.KmADHNAD)/(self.KiADHNAD*self.KmADHETOH) + (self.KmADHNADH*x[0])/(self.KiADHNADH*self.KmADHACE) + x[6]/self.KiADHNAD + (self.ETOH*x[6])/(self.KiADHNAD*self.KmADHETOH) + (self.ETOH*x[0]*x[6])/(self.KiADHACE*self.KiADHNAD*self.KmADHETOH) + (self.KmADHNADH*x[0]*x[6])/(self.KiADHNAD*self.KiADHNADH*self.KmADHACE) + x[7]/self.KiADHNADH + (self.ETOH*self.KmADHNAD*x[7])/(self.KiADHNAD*self.KiADHNADH*self.KmADHETOH) + (x[0]*x[7])/(self.KiADHNADH*self.KmADHACE) + (self.ETOH*x[0]*x[7])/(self.KiADHETOH*self.KiADHNADH*self.KmADHACE))))
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 2 other locations - About 2 hrs to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 342..342
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 342..342

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

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

            def dGLCi_dt(self, x):
                return 1.0 * self.v_14(x) - 1.0 * self.v_1(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 7 other locations - About 1 hr to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 357..358
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 360..361
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 363..364
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 378..379
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 381..382
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 384..385
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 387..388

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

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

            def dF6P_dt(self, x):
                return 1.0 * self.v_2(x) - 1.0 * self.v_5(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 7 other locations - About 1 hr to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 357..358
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 360..361
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 369..370
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 378..379
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 381..382
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 384..385
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 387..388

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

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

            def dF16BP_dt(self, x):
                return 1.0 * self.v_5(x) - 1.0 * self.v_6(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 7 other locations - About 1 hr to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 357..358
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 363..364
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 369..370
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 378..379
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 381..382
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 384..385
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 387..388

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

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

            def dP2G_dt(self, x):
                return 1.0 * self.v_9(x) - 1.0 * self.v_10(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 7 other locations - About 1 hr to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 357..358
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 360..361
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 363..364
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 369..370
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 381..382
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 384..385
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 387..388

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

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

            def dPYR_dt(self, x):
                return 1.0 * self.v_11(x) - 1.0 * self.v_12(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 7 other locations - About 1 hr to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 357..358
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 360..361
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 363..364
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 369..370
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 378..379
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 381..382
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 384..385

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

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

            def dPEP_dt(self, x):
                return 1.0 * self.v_10(x) - 1.0 * self.v_11(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 7 other locations - About 1 hr to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 357..358
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 360..361
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 363..364
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 369..370
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 378..379
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 381..382
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 387..388

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

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

            def dP3G_dt(self, x):
                return 1.0 * self.v_8(x) - 1.0 * self.v_9(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 7 other locations - About 1 hr to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 357..358
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 360..361
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 363..364
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 369..370
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 378..379
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 384..385
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 387..388

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

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

            def dBPG_dt(self, x):
                return 1.0 * self.v_7(x) - 1.0 * self.v_8(x)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 7 other locations - About 1 hr to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 360..361
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 363..364
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 369..370
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 378..379
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 381..382
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 384..385
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 387..388

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

        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

                return (self.VmGLT*(self.GLCo - x[5]/self.KeqGLT))/(self.KmGLTGLCo*(1 + self.GLCo/self.KmGLTGLCo + x[5]/self.KmGLTGLCi + (0.91*self.GLCo*x[5])/(self.KmGLTGLCi*self.KmGLTGLCo)))
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 2 other locations - About 55 mins to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 292..292
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 542..543

        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

                return (-((self.VmGAPDHr*x[1]*x[7])/(self.KmGAPDHBPG*self.KmGAPDHNADH)) + (self.KeqTPI*self.VmGAPDHf*x[6]*x[13])/((1 + self.KeqTPI)*self.KmGAPDHGAP*self.KmGAPDHNAD))/((1 + x[6]/self.KmGAPDHNAD + x[7]/self.KmGAPDHNADH)*(1 + x[1]/self.KmGAPDHBPG + (self.KeqTPI*x[13])/((1 + self.KeqTPI)*self.KmGAPDHGAP)))
        Severity: Minor
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 55 mins to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 297..297

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

                     * self.K1nadh * (1 + self.NAD/self.K1nad + self.NADH / self.K1nadh) *
                     (1 + self.DHAP / self.K1dhap + x[0] / self.K1g3p))
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 2 other locations - About 55 mins to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 292..292
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 337..337

        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

                return (self.VmALD*(x[2] - (self.KeqTPI*x[13]**2)/(self.KeqALD*(1 + self.KeqTPI)**2)))/(self.KmALDF16P*(1 + x[2]/self.KmALDF16P + x[13]/((1 + self.KeqTPI)*self.KmALDDHAP) + (self.KeqTPI*x[13])/((1 + self.KeqTPI)*self.KmALDGAP) + (self.KeqTPI*x[2]*x[13])/((1 + self.KeqTPI)*self.KmALDF16P*self.KmALDGAPi) + (self.KeqTPI*x[13]**2)/((1 + self.KeqTPI)**2*self.KmALDDHAP*self.KmALDGAP)))
        Severity: Minor
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 1 other location - About 55 mins to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 302..302

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

                t = numpy.linspace(t_0, t_end, int((t_end - t_0) / t_step) + 1)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 6 other locations - About 45 mins to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 439..439
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 594..594
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 248..248
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 511..511
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 767..767
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 830..830

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

        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

                t = numpy.linspace(t_0, t_end, int((t_end - t_0) / t_step) + 1)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 6 other locations - About 45 mins to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 439..439
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 710..710
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 248..248
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 511..511
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 767..767
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 830..830

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

        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

                t = numpy.linspace(t_0, t_end, int((t_end - t_0) / t_step) + 1)
        Severity: Major
        Found in intro_to_wc_modeling/cell_modeling/model_composition.py and 6 other locations - About 45 mins to fix
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 594..594
        intro_to_wc_modeling/cell_modeling/model_composition.py on lines 710..710
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 248..248
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 511..511
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 767..767
        intro_to_wc_modeling/cell_modeling/simulation/mrna_and_proteins_using_several_methods.py on lines 830..830

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

        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

        There are no issues that match your filters.

        Category
        Status