mangroveorg/datawinners

View on GitHub
datawinners/custom_reports/crs/migrations/0015_auto__add_numberofrecipientserved.py

Summary

Maintainability
F
6 days
Test Coverage

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

    def forwards(self, orm):
        
        # Adding model 'NumberOfRecipientServed'
        db.create_table('crs_numberofrecipientserved', (
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
datawinners/custom_reports/crs/migrations/0009_auto__add_billoflading.py on lines 9..21
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 9..21

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

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

        'crs.waybillsent': {
            'Meta': {'object_name': 'WayBillSent'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'q1': ('django.db.models.fields.TextField', [], {'db_column': "'pl_code'"}),
            'q10': ('django.db.models.fields.TextField', [], {'db_column': "'receiver_code'"}),
datawinners/custom_reports/crs/migrations/0006_auto__add_field_waybillsent_q10.py on lines 82..94
datawinners/custom_reports/crs/migrations/0007_auto__add_field_waybillreceived_q9.py on lines 83..95
datawinners/custom_reports/crs/migrations/0008_auto__del_field_distribution_q10__del_field_distribution_q12__del_fiel.py on lines 97..109
datawinners/custom_reports/crs/migrations/0009_auto__add_billoflading.py on lines 98..110
datawinners/custom_reports/crs/migrations/0010_auto__add_breakbulksent.py on lines 104..116
datawinners/custom_reports/crs/migrations/0011_auto__add_waybillreceivedport.py on lines 112..124
datawinners/custom_reports/crs/migrations/0012_auto__add_containersent.py on lines 118..130
datawinners/custom_reports/crs/migrations/0013_auto__add_field_waybillreceivedport_q5.py on lines 113..125
datawinners/custom_reports/crs/migrations/0014_auto__add_bav.py on lines 134..146
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 153..165

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

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

        'crs.distribution': {
            'Meta': {'object_name': 'Distribution'},
            'distribution_type': ('django.db.models.fields.TextField', [], {}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'q1': ('django.db.models.fields.TextField', [], {'db_column': "'site_code'"}),
datawinners/custom_reports/crs/migrations/0008_auto__del_field_distribution_q10__del_field_distribution_q12__del_fiel.py on lines 40..51
datawinners/custom_reports/crs/migrations/0009_auto__add_billoflading.py on lines 41..52
datawinners/custom_reports/crs/migrations/0010_auto__add_breakbulksent.py on lines 47..58
datawinners/custom_reports/crs/migrations/0011_auto__add_waybillreceivedport.py on lines 47..58
datawinners/custom_reports/crs/migrations/0012_auto__add_containersent.py on lines 53..64
datawinners/custom_reports/crs/migrations/0013_auto__add_field_waybillreceivedport_q5.py on lines 47..58
datawinners/custom_reports/crs/migrations/0014_auto__add_bav.py on lines 68..79
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 67..78

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

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

        'crs.waybillreceived': {
            'Meta': {'object_name': 'WayBillReceived'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'q1': ('django.db.models.fields.TextField', [], {'db_column': "'pl_code'"}),
            'q2': ('django.db.models.fields.TextField', [], {'db_column': "'waybill_code'"}),
datawinners/custom_reports/crs/migrations/0007_auto__add_field_waybillreceived_q9.py on lines 70..81
datawinners/custom_reports/crs/migrations/0008_auto__del_field_distribution_q10__del_field_distribution_q12__del_fiel.py on lines 84..95
datawinners/custom_reports/crs/migrations/0009_auto__add_billoflading.py on lines 85..96
datawinners/custom_reports/crs/migrations/0010_auto__add_breakbulksent.py on lines 91..102
datawinners/custom_reports/crs/migrations/0011_auto__add_waybillreceivedport.py on lines 91..102
datawinners/custom_reports/crs/migrations/0012_auto__add_containersent.py on lines 97..108
datawinners/custom_reports/crs/migrations/0013_auto__add_field_waybillreceivedport_q5.py on lines 91..102
datawinners/custom_reports/crs/migrations/0014_auto__add_bav.py on lines 112..123
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 131..142

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

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

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

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

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

Refactorings

Further Reading

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

        'crs.bav': {
            'Meta': {'object_name': 'BAV'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'q1': ('django.db.models.fields.TextField', [], {'db_column': "'bav_type'"}),
            'q2': ('django.db.models.fields.DateField', [], {'db_column': "'bav_date'"}),
datawinners/custom_reports/crs/migrations/0014_auto__add_bav.py on lines 32..41
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 31..40

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

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

        'crs.billoflading': {
            'Meta': {'object_name': 'BillOfLading'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'q1': ('django.db.models.fields.TextField', [], {'db_column': "'pl_code'"}),
            'q2': ('django.db.models.fields.TextField', [], {'db_column': "'shipment_type'"}),
datawinners/custom_reports/crs/migrations/0009_auto__add_billoflading.py on lines 31..39
datawinners/custom_reports/crs/migrations/0010_auto__add_breakbulksent.py on lines 29..37
datawinners/custom_reports/crs/migrations/0011_auto__add_waybillreceivedport.py on lines 29..37
datawinners/custom_reports/crs/migrations/0012_auto__add_containersent.py on lines 28..36
datawinners/custom_reports/crs/migrations/0013_auto__add_field_waybillreceivedport_q5.py on lines 22..30
datawinners/custom_reports/crs/migrations/0014_auto__add_bav.py on lines 43..51
datawinners/custom_reports/crs/migrations/0015_auto__add_numberofrecipientserved.py on lines 80..88
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 42..50
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 80..88
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 90..98

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

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

        'crs.numberofrecipientserved': {
            'Meta': {'object_name': 'NumberOfRecipientServed'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'q1': ('django.db.models.fields.TextField', [], {'db_column': "'received_type'"}),
            'q2': ('django.db.models.fields.DateField', [], {'db_column': "'received_date'"}),
datawinners/custom_reports/crs/migrations/0009_auto__add_billoflading.py on lines 31..39
datawinners/custom_reports/crs/migrations/0010_auto__add_breakbulksent.py on lines 29..37
datawinners/custom_reports/crs/migrations/0011_auto__add_waybillreceivedport.py on lines 29..37
datawinners/custom_reports/crs/migrations/0012_auto__add_containersent.py on lines 28..36
datawinners/custom_reports/crs/migrations/0013_auto__add_field_waybillreceivedport_q5.py on lines 22..30
datawinners/custom_reports/crs/migrations/0014_auto__add_bav.py on lines 43..51
datawinners/custom_reports/crs/migrations/0015_auto__add_numberofrecipientserved.py on lines 42..50
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 42..50
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 80..88
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 90..98

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

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

        'crs.waybillreceivedport': {
            'Meta': {'object_name': 'WayBillReceivedPort'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'q1': ('django.db.models.fields.TextField', [], {'db_column': "'waybill_code'"}),
            'q2': ('django.db.models.fields.DateField', [], {'db_column': "'received_date'"}),
datawinners/custom_reports/crs/migrations/0013_auto__add_field_waybillreceivedport_q5.py on lines 104..111
datawinners/custom_reports/crs/migrations/0014_auto__add_bav.py on lines 125..132
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 144..151

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

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

        'crs.breakbulksent': {
            'Meta': {'object_name': 'BreakBulkSent'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'q1': ('django.db.models.fields.DateField', [], {'db_column': "'sent_date'"}),
            'q2': ('django.db.models.fields.FloatField', [], {'db_column': "'weight'"}),
datawinners/custom_reports/crs/migrations/0010_auto__add_breakbulksent.py on lines 39..45
datawinners/custom_reports/crs/migrations/0011_auto__add_waybillreceivedport.py on lines 39..45
datawinners/custom_reports/crs/migrations/0011_auto__add_waybillreceivedport.py on lines 104..110
datawinners/custom_reports/crs/migrations/0012_auto__add_containersent.py on lines 38..44
datawinners/custom_reports/crs/migrations/0012_auto__add_containersent.py on lines 110..116
datawinners/custom_reports/crs/migrations/0013_auto__add_field_waybillreceivedport_q5.py on lines 32..38
datawinners/custom_reports/crs/migrations/0014_auto__add_bav.py on lines 53..59
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 52..58

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

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

        'crs.containersent': {
            'Meta': {'object_name': 'ContainerSent'},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'q1': ('django.db.models.fields.TextField', [], {'db_column': "'bill_of_lading'"}),
            'q2': ('django.db.models.fields.FloatField', [], {'db_column': "'weight'"}),
datawinners/custom_reports/crs/migrations/0012_auto__add_containersent.py on lines 46..51
datawinners/custom_reports/crs/migrations/0013_auto__add_field_waybillreceivedport_q5.py on lines 40..45
datawinners/custom_reports/crs/migrations/0014_auto__add_bav.py on lines 61..66
datawinners/custom_reports/crs/migrations/0016_auto__add_distributionatcps.py on lines 60..65

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

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