KarrLab/wc_model_gen

View on GitHub

Showing 221 of 341 total issues

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

                    coefficient=-((gvar.protein_aa_usage[mrna_kb.protein.id]['len']-1)*2 + 1)))           
Severity: Minor
Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 55 mins to fix
wc_model_gen/eukaryote/translation_translocation.py on lines 476..478

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

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

        rnas_kb = [i for i in cell.species_types.get(__type=wc_kb.eukaryote.TranscriptSpeciesType) \
            if i.id not in transcribed_together]
Severity: Minor
Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 55 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 857..858

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

            init_rate_law = model.rate_laws.create(
                direction=wc_lang.RateLawDirection.forward,
                type=None,
                expression=init_rate_law_expression,
                reaction=init_reaction,
Severity: Minor
Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 55 mins to fix
wc_model_gen/eukaryote/translation_translocation.py on lines 1443..1448

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

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

        Avogadro = self.model.parameters.get_or_create(
            id='Avogadro',
            type=None,
            value=scipy.constants.Avogadro,
            units=unit_registry.parse_units('molecule mol^-1'))       
Severity: Major
Found in wc_model_gen/eukaryote/rna_degradation.py and 2 other locations - About 50 mins to fix
wc_model_gen/eukaryote/protein_degradation.py on lines 243..247
wc_model_gen/eukaryote/translation_translocation.py on lines 1124..1128

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        Avogadro = self.model.parameters.get_or_create(
            id='Avogadro',
            type=None,
            value=scipy.constants.Avogadro,
            units=unit_registry.parse_units('molecule mol^-1'))       
Severity: Major
Found in wc_model_gen/eukaryote/protein_degradation.py and 2 other locations - About 50 mins to fix
wc_model_gen/eukaryote/rna_degradation.py on lines 200..204
wc_model_gen/eukaryote/translation_translocation.py on lines 1124..1128

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        Avogadro = self.model.parameters.get_or_create(
            id='Avogadro',
            type=None,
            value=scipy.constants.Avogadro,
            units=unit_registry.parse_units('molecule mol^-1'))
Severity: Major
Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 50 mins to fix
wc_model_gen/eukaryote/protein_degradation.py on lines 243..247
wc_model_gen/eukaryote/rna_degradation.py on lines 200..204

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

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

                    for species in modifier.expression.species:
                        if species == self._rxn_species_modifier[reaction.id][0]:
                            modifier_reactants.append(species)
Severity: Major
Found in wc_model_gen/eukaryote/protein_degradation.py and 2 other locations - About 45 mins to fix
wc_model_gen/eukaryote/protein_degradation.py on lines 178..179
wc_model_gen/eukaryote/protein_degradation.py on lines 200..201

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

            specific_binding_constant = model.parameters.create(
                id='k_specific_binding_{}'.format(polr_complex.id),
                type=None,
                units=unit_registry.parse_units('molecule^-2 s^-1')
Severity: Major
Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 680..683
wc_model_gen/eukaryote/translation_translocation.py on lines 791..794

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

                init_reaction.participants.append(metabolites['h2o'][
                    transcription_compartment.id].species_coefficients.get_or_create(
Severity: Major
Found in wc_model_gen/eukaryote/transcription.py and 12 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 439..440
wc_model_gen/eukaryote/transcription.py on lines 445..446
wc_model_gen/eukaryote/transcription.py on lines 448..449
wc_model_gen/eukaryote/transcription.py on lines 451..452
wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

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

                        if proteasome_species == self._rxn_species_modifier[reaction.id][0]:
                            modifier_reactants.append(proteasome_species)
Severity: Major
Found in wc_model_gen/eukaryote/protein_degradation.py and 2 other locations - About 45 mins to fix
wc_model_gen/eukaryote/protein_degradation.py on lines 178..179
wc_model_gen/eukaryote/protein_degradation.py on lines 184..186

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

                                        gvar.protein_aa_usage[subunit.species_type.id] = {
                                            i:0 for i in list(amino_acid_id_conversion.keys())}
Severity: Minor
Found in wc_model_gen/eukaryote/complexation.py and 1 other location - About 45 mins to fix
wc_model_gen/eukaryote/translation_translocation.py on lines 286..286

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

                init_reaction.participants.append(metabolites['atp'][
                    transcription_compartment.id].species_coefficients.get_or_create(
Severity: Major
Found in wc_model_gen/eukaryote/transcription.py and 12 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 442..443
wc_model_gen/eukaryote/transcription.py on lines 445..446
wc_model_gen/eukaryote/transcription.py on lines 448..449
wc_model_gen/eukaryote/transcription.py on lines 451..452
wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

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

                init_reaction.participants.append(metabolites['pi'][
                    transcription_compartment.id].species_coefficients.get_or_create(
Severity: Major
Found in wc_model_gen/eukaryote/transcription.py and 12 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 439..440
wc_model_gen/eukaryote/transcription.py on lines 442..443
wc_model_gen/eukaryote/transcription.py on lines 445..446
wc_model_gen/eukaryote/transcription.py on lines 451..452
wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

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

            non_specific_binding_constant = model.parameters.create(
                id='k_non_specific_binding_{}'.format(polr_complex.id),
                type=None,
                units=unit_registry.parse_units('molecule^-1 s^-1')
Severity: Major
Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 743..746
wc_model_gen/eukaryote/translation_translocation.py on lines 791..794

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

            specific_binding_constant = model.parameters.create(
                id='{}_ribosome_binding_constant'.format(mrna_kb.id),
                type=None,
                units=unit_registry.parse_units('molecule^-2 s^-1'),
Severity: Major
Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 680..683
wc_model_gen/eukaryote/transcription.py on lines 743..746

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

            init_reaction.participants.append(metabolites['atp'][
                translation_compartment.id].species_coefficients.get_or_create(coefficient=-2))
Severity: Major
Found in wc_model_gen/eukaryote/translation_translocation.py and 12 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 439..440
wc_model_gen/eukaryote/transcription.py on lines 442..443
wc_model_gen/eukaryote/transcription.py on lines 445..446
wc_model_gen/eukaryote/transcription.py on lines 448..449
wc_model_gen/eukaryote/transcription.py on lines 451..452
wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

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

                init_reaction.participants.append(metabolites['h'][
                    transcription_compartment.id].species_coefficients.get_or_create(
Severity: Major
Found in wc_model_gen/eukaryote/transcription.py and 12 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 439..440
wc_model_gen/eukaryote/transcription.py on lines 442..443
wc_model_gen/eukaryote/transcription.py on lines 445..446
wc_model_gen/eukaryote/transcription.py on lines 448..449
wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

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

            init_reaction.participants.append(metabolites['pi'][
                translation_compartment.id].species_coefficients.get_or_create(coefficient=5))
Severity: Major
Found in wc_model_gen/eukaryote/translation_translocation.py and 12 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 439..440
wc_model_gen/eukaryote/transcription.py on lines 442..443
wc_model_gen/eukaryote/transcription.py on lines 445..446
wc_model_gen/eukaryote/transcription.py on lines 448..449
wc_model_gen/eukaryote/transcription.py on lines 451..452
wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
wc_model_gen/eukaryote/translation_translocation.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 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 13 locations. Consider refactoring.
Open

            init_reaction.participants.append(metabolites['h2o'][
                translation_compartment.id].species_coefficients.get_or_create(coefficient=-5))
Severity: Major
Found in wc_model_gen/eukaryote/translation_translocation.py and 12 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 439..440
wc_model_gen/eukaryote/transcription.py on lines 442..443
wc_model_gen/eukaryote/transcription.py on lines 445..446
wc_model_gen/eukaryote/transcription.py on lines 448..449
wc_model_gen/eukaryote/transcription.py on lines 451..452
wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

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

            init_reaction.participants.append(metabolites['gdp'][
                translation_compartment.id].species_coefficients.get_or_create(coefficient=2))
Severity: Major
Found in wc_model_gen/eukaryote/translation_translocation.py and 12 other locations - About 45 mins to fix
wc_model_gen/eukaryote/transcription.py on lines 439..440
wc_model_gen/eukaryote/transcription.py on lines 442..443
wc_model_gen/eukaryote/transcription.py on lines 445..446
wc_model_gen/eukaryote/transcription.py on lines 448..449
wc_model_gen/eukaryote/transcription.py on lines 451..452
wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

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

Severity
Category
Status
Source
Language