Skip to content

Commit

Permalink
Add score field to Duplicate model
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-misuk-valor committed May 22, 2024
1 parent 3728173 commit ae004c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/hope_dedup_engine/apps/api/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.0.6 on 2024-05-21 07:23
# Generated by Django 5.0.6 on 2024-05-22 13:24

import django.db.models.deletion
import uuid
Expand Down Expand Up @@ -63,9 +63,10 @@ class Migration(migrations.Migration):
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("first_reference_pk", models.IntegerField()),
("second_reference_pk", models.IntegerField()),
("first_filename", models.CharField(max_length=255)),
("second_reference_pk", models.IntegerField()),
("second_filename", models.CharField(max_length=255)),
("score", models.FloatField()),
(
"deduplication_set",
models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="api.deduplicationset"),
Expand Down
1 change: 1 addition & 0 deletions src/hope_dedup_engine/apps/api/models/deduplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ class Duplicate(models.Model):
first_filename = models.CharField(max_length=255)
second_reference_pk = models.IntegerField()
second_filename = models.CharField(max_length=255)
score = models.FloatField()
1 change: 1 addition & 0 deletions tests/extras/testutils/factories/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class DuplicateFactory(DjangoModelFactory):
first_reference_pk = fuzzy.FuzzyInteger(low=1)
second_filename = fuzzy.FuzzyText()
second_reference_pk = fuzzy.FuzzyInteger(low=1)
score = fuzzy.FuzzyFloat(low=0, high=1)

class Meta:
model = Duplicate

0 comments on commit ae004c0

Please sign in to comment.