inasafe/inasafe

View on GitHub
safe/definitions/analysis_steps.py

Summary

Maintainability
C
1 day
Test Coverage

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

analysis_steps['pre_processing'] = {
    'key': 'pre_processing',
    'name': tr('Pre processing'),
    'description': tr(
        'During this step we check if we can create some side products based '
Severity: Major
Found in safe/definitions/analysis_steps.py and 9 other locations - About 1 hr to fix
safe/definitions/analysis_steps.py on lines 33..43
safe/definitions/analysis_steps.py on lines 60..70
safe/definitions/analysis_steps.py on lines 74..83
safe/definitions/analysis_steps.py on lines 87..98
safe/definitions/analysis_steps.py on lines 102..114
safe/definitions/analysis_steps.py on lines 119..131
safe/definitions/analysis_steps.py on lines 135..146
safe/definitions/analysis_steps.py on lines 150..160
safe/definitions/analysis_steps.py on lines 164..174

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

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

analysis_steps['exposure_preparation'] = {
    'key': 'exposure_preparation',
    'name': tr('Exposure preparation'),
    'description': tr(
        'During the exposure preparation phase of the analysis, we '
Severity: Major
Found in safe/definitions/analysis_steps.py and 9 other locations - About 1 hr to fix
safe/definitions/analysis_steps.py on lines 33..43
safe/definitions/analysis_steps.py on lines 47..56
safe/definitions/analysis_steps.py on lines 60..70
safe/definitions/analysis_steps.py on lines 87..98
safe/definitions/analysis_steps.py on lines 102..114
safe/definitions/analysis_steps.py on lines 119..131
safe/definitions/analysis_steps.py on lines 135..146
safe/definitions/analysis_steps.py on lines 150..160
safe/definitions/analysis_steps.py on lines 164..174

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

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

analysis_steps['post_processing'] = {
    'key': 'post_processing',
    'name': tr('Post processing'),
    'description': tr(
        'During this step we analyse each exposure feature to determine '
Severity: Major
Found in safe/definitions/analysis_steps.py and 9 other locations - About 1 hr to fix
safe/definitions/analysis_steps.py on lines 33..43
safe/definitions/analysis_steps.py on lines 47..56
safe/definitions/analysis_steps.py on lines 60..70
safe/definitions/analysis_steps.py on lines 74..83
safe/definitions/analysis_steps.py on lines 87..98
safe/definitions/analysis_steps.py on lines 102..114
safe/definitions/analysis_steps.py on lines 119..131
safe/definitions/analysis_steps.py on lines 150..160
safe/definitions/analysis_steps.py on lines 164..174

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

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

analysis_steps['aggregation_preparation'] = {
    'key': 'aggregation_preparation',
    'name': tr('Aggregation preparation'),
    'description': tr(
        'During this step we prepare the aggregation data, extracting '
Severity: Major
Found in safe/definitions/analysis_steps.py and 9 other locations - About 1 hr to fix
safe/definitions/analysis_steps.py on lines 33..43
safe/definitions/analysis_steps.py on lines 47..56
safe/definitions/analysis_steps.py on lines 60..70
safe/definitions/analysis_steps.py on lines 74..83
safe/definitions/analysis_steps.py on lines 102..114
safe/definitions/analysis_steps.py on lines 119..131
safe/definitions/analysis_steps.py on lines 135..146
safe/definitions/analysis_steps.py on lines 150..160
safe/definitions/analysis_steps.py on lines 164..174

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

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

analysis_steps['aggregate_hazard_preparation'] = {
    'key': 'aggregate_hazard_preparation',
    'name': tr('Aggregate hazard preparation'),
    'description': tr(
        'In this step we union the hazard data and the aggregation data '
Severity: Major
Found in safe/definitions/analysis_steps.py and 9 other locations - About 1 hr to fix
safe/definitions/analysis_steps.py on lines 33..43
safe/definitions/analysis_steps.py on lines 47..56
safe/definitions/analysis_steps.py on lines 60..70
safe/definitions/analysis_steps.py on lines 74..83
safe/definitions/analysis_steps.py on lines 87..98
safe/definitions/analysis_steps.py on lines 119..131
safe/definitions/analysis_steps.py on lines 135..146
safe/definitions/analysis_steps.py on lines 150..160
safe/definitions/analysis_steps.py on lines 164..174

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

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

analysis_steps['combine_hazard_exposure'] = {
    'key': 'combine_hazard_exposure',
    'name': tr('Combine aggregate hazard and exposure'),
    'description': tr(
        'In this step we combine the aggregate hazard and exposure layers '
Severity: Major
Found in safe/definitions/analysis_steps.py and 9 other locations - About 1 hr to fix
safe/definitions/analysis_steps.py on lines 33..43
safe/definitions/analysis_steps.py on lines 47..56
safe/definitions/analysis_steps.py on lines 60..70
safe/definitions/analysis_steps.py on lines 74..83
safe/definitions/analysis_steps.py on lines 87..98
safe/definitions/analysis_steps.py on lines 102..114
safe/definitions/analysis_steps.py on lines 135..146
safe/definitions/analysis_steps.py on lines 150..160
safe/definitions/analysis_steps.py on lines 164..174

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

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

analysis_steps['profiling'] = {
    'key': 'profiling',
    'name': tr('Profiling'),
    'description': tr(
        'At the end of the analysis we extract profiling data so that '
Severity: Major
Found in safe/definitions/analysis_steps.py and 9 other locations - About 1 hr to fix
safe/definitions/analysis_steps.py on lines 33..43
safe/definitions/analysis_steps.py on lines 47..56
safe/definitions/analysis_steps.py on lines 60..70
safe/definitions/analysis_steps.py on lines 74..83
safe/definitions/analysis_steps.py on lines 87..98
safe/definitions/analysis_steps.py on lines 102..114
safe/definitions/analysis_steps.py on lines 119..131
safe/definitions/analysis_steps.py on lines 135..146
safe/definitions/analysis_steps.py on lines 150..160

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

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

analysis_steps['summary_calculation'] = {
    'key': 'summary',
    'name': tr('Summary calculation'),
    'description': tr(
        'At the end of the analysis we summarise the analysis results '
Severity: Major
Found in safe/definitions/analysis_steps.py and 9 other locations - About 1 hr to fix
safe/definitions/analysis_steps.py on lines 33..43
safe/definitions/analysis_steps.py on lines 47..56
safe/definitions/analysis_steps.py on lines 60..70
safe/definitions/analysis_steps.py on lines 74..83
safe/definitions/analysis_steps.py on lines 87..98
safe/definitions/analysis_steps.py on lines 102..114
safe/definitions/analysis_steps.py on lines 119..131
safe/definitions/analysis_steps.py on lines 135..146
safe/definitions/analysis_steps.py on lines 164..174

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

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

analysis_steps['data_store'] = {
    'key': 'data_store',
    'name': tr('Data store creation'),
    'description': tr(
        'In this phase we create a data store. The data store is a '
Severity: Major
Found in safe/definitions/analysis_steps.py and 9 other locations - About 1 hr to fix
safe/definitions/analysis_steps.py on lines 47..56
safe/definitions/analysis_steps.py on lines 60..70
safe/definitions/analysis_steps.py on lines 74..83
safe/definitions/analysis_steps.py on lines 87..98
safe/definitions/analysis_steps.py on lines 102..114
safe/definitions/analysis_steps.py on lines 119..131
safe/definitions/analysis_steps.py on lines 135..146
safe/definitions/analysis_steps.py on lines 150..160
safe/definitions/analysis_steps.py on lines 164..174

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

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

analysis_steps['hazard_preparation'] = {
    'key': 'hazard_preparation',
    'name': tr('Hazard preparation'),
    'description': tr(
        'During the hazard preparation phase of the analysis, we convert '
Severity: Major
Found in safe/definitions/analysis_steps.py and 9 other locations - About 1 hr to fix
safe/definitions/analysis_steps.py on lines 33..43
safe/definitions/analysis_steps.py on lines 47..56
safe/definitions/analysis_steps.py on lines 74..83
safe/definitions/analysis_steps.py on lines 87..98
safe/definitions/analysis_steps.py on lines 102..114
safe/definitions/analysis_steps.py on lines 119..131
safe/definitions/analysis_steps.py on lines 135..146
safe/definitions/analysis_steps.py on lines 150..160
safe/definitions/analysis_steps.py on lines 164..174

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

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