Showing 4,525 of 10,154 total issues

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

Severity: Major
Found in myems-aggregation/shopfloor_energy_input_category.py and 4 other locations - About 1 mo to fix
myems-aggregation/combined_equipment_energy_input_category.py on lines 0..622
myems-aggregation/combined_equipment_energy_input_item.py on lines 0..625
myems-aggregation/combined_equipment_energy_output_category.py on lines 0..622
myems-aggregation/shopfloor_energy_input_item.py on lines 0..622

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/tenantstatistics.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantenergycategory.py on lines 630..910

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/tenantenergycategory.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantenergycategory.py on lines 630..910
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/shopfloorenergycategory.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantenergycategory.py on lines 630..910
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/shopfloorstatistics.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantenergycategory.py on lines 630..910
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/equipmentenergycategory.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantenergycategory.py on lines 630..910
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/storestatistics.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/tenantenergycategory.py on lines 630..910
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/spacestatistics.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantenergycategory.py on lines 630..910
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/equipmentstatistics.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantenergycategory.py on lines 630..910
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/spaceenergycategory.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantenergycategory.py on lines 630..910
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/combinedequipmentstatistics.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storeenergycategory.py on lines 667..948
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantenergycategory.py on lines 630..910
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if "timestamps" not in reporting_period_data.keys() or \
            reporting_period_data['timestamps'] is None or \
            len(reporting_period_data['timestamps']) == 0:
        pass
    else:
Severity: Major
Found in myems-api/excelexporters/storeenergycategory.py and 11 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergycategory.py on lines 524..805
myems-api/excelexporters/combinedequipmentstatistics.py on lines 340..621
myems-api/excelexporters/equipmentenergycategory.py on lines 518..799
myems-api/excelexporters/equipmentstatistics.py on lines 345..626
myems-api/excelexporters/shopfloorenergycategory.py on lines 658..939
myems-api/excelexporters/shopfloorstatistics.py on lines 452..733
myems-api/excelexporters/spaceenergycategory.py on lines 729..1009
myems-api/excelexporters/spacestatistics.py on lines 460..741
myems-api/excelexporters/storestatistics.py on lines 451..732
myems-api/excelexporters/tenantenergycategory.py on lines 630..910
myems-api/excelexporters/tenantstatistics.py on lines 461..745

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

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

    if not is_base_period_timestamp_exists_flag:
        if has_values_data and has_timestamps_data:
            ca_len = len(reporting_period_data['names'])
            time = reporting_period_data['timestamps'][0]
            real_timestamps_len = timestamps_data_not_equal_0(report['parameters']['timestamps'])
Severity: Major
Found in myems-api/excelexporters/combinedequipmentenergyitem.py and 5 other locations - About 1 mo to fix
myems-api/excelexporters/equipmentenergyitem.py on lines 325..594
myems-api/excelexporters/shopfloorenergyitem.py on lines 345..614
myems-api/excelexporters/spaceenergyitem.py on lines 347..616
myems-api/excelexporters/storeenergyitem.py on lines 345..614
myems-api/excelexporters/tenantenergyitem.py on lines 345..614

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

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

    if not is_base_period_timestamp_exists_flag:
        if has_values_data and has_timestamps_data:
            ca_len = len(reporting_period_data['names'])
            time = reporting_period_data['timestamps'][0]
            real_timestamps_len = timestamps_data_not_equal_0(report['parameters']['timestamps'])
Severity: Major
Found in myems-api/excelexporters/tenantenergyitem.py and 5 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergyitem.py on lines 333..602
myems-api/excelexporters/equipmentenergyitem.py on lines 325..594
myems-api/excelexporters/shopfloorenergyitem.py on lines 345..614
myems-api/excelexporters/spaceenergyitem.py on lines 347..616
myems-api/excelexporters/storeenergyitem.py on lines 345..614

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

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

    if not is_base_period_timestamp_exists_flag:
        if has_values_data and has_timestamps_data:
            ca_len = len(reporting_period_data['names'])
            time = reporting_period_data['timestamps'][0]
            real_timestamps_len = timestamps_data_not_equal_0(report['parameters']['timestamps'])
Severity: Major
Found in myems-api/excelexporters/storeenergyitem.py and 5 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergyitem.py on lines 333..602
myems-api/excelexporters/equipmentenergyitem.py on lines 325..594
myems-api/excelexporters/shopfloorenergyitem.py on lines 345..614
myems-api/excelexporters/spaceenergyitem.py on lines 347..616
myems-api/excelexporters/tenantenergyitem.py on lines 345..614

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

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

    if not is_base_period_timestamp_exists_flag:
        if has_values_data and has_timestamps_data:
            ca_len = len(reporting_period_data['names'])
            time = reporting_period_data['timestamps'][0]
            real_timestamps_len = timestamps_data_not_equal_0(report['parameters']['timestamps'])
Severity: Major
Found in myems-api/excelexporters/spaceenergyitem.py and 5 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergyitem.py on lines 333..602
myems-api/excelexporters/equipmentenergyitem.py on lines 325..594
myems-api/excelexporters/shopfloorenergyitem.py on lines 345..614
myems-api/excelexporters/storeenergyitem.py on lines 345..614
myems-api/excelexporters/tenantenergyitem.py on lines 345..614

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

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

    if not is_base_period_timestamp_exists_flag:
        if has_values_data and has_timestamps_data:
            ca_len = len(reporting_period_data['names'])
            time = reporting_period_data['timestamps'][0]
            real_timestamps_len = timestamps_data_not_equal_0(report['parameters']['timestamps'])
Severity: Major
Found in myems-api/excelexporters/shopfloorenergyitem.py and 5 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergyitem.py on lines 333..602
myems-api/excelexporters/equipmentenergyitem.py on lines 325..594
myems-api/excelexporters/spaceenergyitem.py on lines 347..616
myems-api/excelexporters/storeenergyitem.py on lines 345..614
myems-api/excelexporters/tenantenergyitem.py on lines 345..614

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

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

    if not is_base_period_timestamp_exists_flag:
        if has_values_data and has_timestamps_data:
            ca_len = len(reporting_period_data['names'])
            time = reporting_period_data['timestamps'][0]
            real_timestamps_len = timestamps_data_not_equal_0(report['parameters']['timestamps'])
Severity: Major
Found in myems-api/excelexporters/equipmentenergyitem.py and 5 other locations - About 1 mo to fix
myems-api/excelexporters/combinedequipmentenergyitem.py on lines 333..602
myems-api/excelexporters/shopfloorenergyitem.py on lines 345..614
myems-api/excelexporters/spaceenergyitem.py on lines 347..616
myems-api/excelexporters/storeenergyitem.py on lines 345..614
myems-api/excelexporters/tenantenergyitem.py on lines 345..614

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

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

Severity: Major
Found in myems-api/reports/energystoragepowerstationitemenergy.py and 2 other locations - About 1 mo to fix
myems-api/reports/energystoragepowerstationitembilling.py on lines 0..434
myems-api/reports/energystoragepowerstationitemcarbon.py on lines 0..434

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

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