Showing 4,494 of 10,143 total issues

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

    @staticmethod
    def on_get(req, resp, id_, pid):
        if 'API-KEY' not in req.headers or \
                not isinstance(req.headers['API-KEY'], str) or \
                len(str.strip(req.headers['API-KEY'])) == 0:
Severity: Major
Found in myems-api/core/equipment.py and 1 other location - About 1 wk to fix
myems-api/core/combinedequipment.py on lines 1077..1197

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

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

    @staticmethod
    def on_get(req, resp, id_, pid):
        if 'API-KEY' not in req.headers or \
                not isinstance(req.headers['API-KEY'], str) or \
                len(str.strip(req.headers['API-KEY'])) == 0:
Severity: Major
Found in myems-api/core/combinedequipment.py and 1 other location - About 1 wk to fix
myems-api/core/equipment.py on lines 903..1023

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

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

class ShopfloorVirtualMeterCollection:
    @staticmethod
    def __init__():
        """Initializes ShopfloorVirtualMeterCollection"""
        pass
Severity: Major
Found in myems-api/core/shopfloor.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 1545..1671
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 769..895
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 869..997
myems-api/core/tenant.py on lines 1433..1561

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

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

class TenantOfflineMeterCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/tenant.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 1545..1671
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 769..895
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 1433..1561

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

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

class SpaceOfflineMeterCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/space.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 769..895
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 869..997
myems-api/core/tenant.py on lines 1433..1561

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

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

class ShopfloorMeterCollection:
    @staticmethod
    def __init__():
        """Initializes ShopfloorMeterCollection"""
        pass
Severity: Major
Found in myems-api/core/shopfloor.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 1545..1671
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 769..895
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 869..997
myems-api/core/tenant.py on lines 1433..1561

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

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

class ShopfloorOfflineMeterCollection:
    @staticmethod
    def __init__():
        """Initializes ShopfloorOfflineMeterCollection"""
        pass
Severity: Major
Found in myems-api/core/shopfloor.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 1545..1671
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 769..895
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 869..997
myems-api/core/tenant.py on lines 1433..1561

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

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

class TenantVirtualMeterCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/tenant.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 1545..1671
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 769..895
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 869..997

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

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

class StoreMeterCollection:
    @staticmethod
    def __init__():
        """"Initializes StoreMeterCollection"""
        pass
Severity: Major
Found in myems-api/core/store.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 1545..1671
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 769..895
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 869..997
myems-api/core/tenant.py on lines 1433..1561

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

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

class TenantMeterCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/tenant.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 1545..1671
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 769..895
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 869..997
myems-api/core/tenant.py on lines 1433..1561

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

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

class SpaceVirtualMeterCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/space.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 1545..1671
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 769..895
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 869..997
myems-api/core/tenant.py on lines 1433..1561

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

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

class StoreVirtualMeterCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/store.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 1545..1671
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 769..895
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 869..997
myems-api/core/tenant.py on lines 1433..1561

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

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

class SpaceMeterCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/space.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1545..1671
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 769..895
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 869..997
myems-api/core/tenant.py on lines 1433..1561

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

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

class StoreOfflineMeterCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/store.py and 11 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 638..764
myems-api/core/shopfloor.py on lines 828..954
myems-api/core/shopfloor.py on lines 1386..1512
myems-api/core/space.py on lines 1353..1479
myems-api/core/space.py on lines 1545..1671
myems-api/core/space.py on lines 2634..2760
myems-api/core/store.py on lines 579..705
myems-api/core/store.py on lines 1327..1453
myems-api/core/tenant.py on lines 677..805
myems-api/core/tenant.py on lines 869..997
myems-api/core/tenant.py on lines 1433..1561

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

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

class SpacePointCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/space.py and 3 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 1019..1144
myems-api/core/store.py on lines 960..1085
myems-api/core/tenant.py on lines 1062..1189

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

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

class StorePointCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/store.py and 3 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 1019..1144
myems-api/core/space.py on lines 1736..1861
myems-api/core/tenant.py on lines 1062..1189

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

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

class ShopfloorPointCollection:
    @staticmethod
    def __init__():
        """Initializes ShopfloorPointCollection"""
        pass
Severity: Major
Found in myems-api/core/shopfloor.py and 3 other locations - About 1 wk to fix
myems-api/core/space.py on lines 1736..1861
myems-api/core/store.py on lines 960..1085
myems-api/core/tenant.py on lines 1062..1189

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

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

class TenantPointCollection:
    @staticmethod
    def __init__():
        """Initializes Class"""
        pass
Severity: Major
Found in myems-api/core/tenant.py and 3 other locations - About 1 wk to fix
myems-api/core/shopfloor.py on lines 1019..1144
myems-api/core/space.py on lines 1736..1861
myems-api/core/store.py on lines 960..1085

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

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/excelexporters/meterbatch.py and 2 other locations - About 1 wk to fix
myems-api/excelexporters/offlinemeterbatch.py on lines 0..121
myems-api/excelexporters/virtualmeterbatch.py on lines 0..121

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

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/excelexporters/offlinemeterbatch.py and 2 other locations - About 1 wk to fix
myems-api/excelexporters/meterbatch.py on lines 0..121
myems-api/excelexporters/virtualmeterbatch.py on lines 0..121

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

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