Skip to content

Commit 15c8b32

Browse files
authored
Rename sha256 to checksum (#4689)
1 parent 08ea587 commit 15c8b32

11 files changed

Lines changed: 53 additions & 14 deletions

File tree

app/grandchallenge/algorithms/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ class AlgorithmModelAdmin(admin.ModelAdmin):
280280
readonly_fields = (
281281
"creator",
282282
"algorithm",
283-
"sha256",
283+
"checksum",
284284
"size_in_storage",
285285
"user_upload",
286286
"import_status",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 5.2.12 on 2026-04-28 16:06
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("algorithms", "0094_remove_endpoint_algorithm_interface_and_more"),
10+
]
11+
12+
operations = [
13+
migrations.RenameField(
14+
model_name="algorithmmodel",
15+
old_name="sha256",
16+
new_name="checksum",
17+
),
18+
]

app/grandchallenge/algorithms/templates/algorithms/algorithmmodel_detail.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ <h2>Algorithm Model</h2>
7575
<dd>{{ object.model.size|naturalsize }}</dd>
7676
{% endif %}
7777

78-
{% if object.sha256 %}
79-
<dt>SHA256</dt>
80-
<dd>{{ object.sha256 }}</dd>
78+
{% if object.checksum %}
79+
<dt>Checksum</dt>
80+
<dd>{{ object.checksum }}</dd>
8181
{% endif %}
8282

8383
<dt>Import Status</dt>

app/grandchallenge/components/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2901,7 +2901,7 @@ class Tarball(UUIDModel):
29012901
on_delete=models.SET_NULL,
29022902
validators=[validate_gzip_mimetype],
29032903
)
2904-
sha256 = models.CharField(editable=False, max_length=71)
2904+
checksum = models.CharField(editable=False, max_length=71)
29052905
size_in_storage = models.PositiveBigIntegerField(
29062906
editable=False,
29072907
default=0,

app/grandchallenge/components/tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ def assign_tarball_from_upload(
16071607
checksum = get_object_checksum(getattr(current_tarball, field_to_copy))
16081608

16091609
if (
1610-
TarballModel.objects.filter(sha256=checksum)
1610+
TarballModel.objects.filter(checksum=checksum)
16111611
.exclude(pk=current_tarball.pk)
16121612
.exists()
16131613
):
@@ -1620,7 +1620,7 @@ def assign_tarball_from_upload(
16201620

16211621
return
16221622

1623-
current_tarball.sha256 = checksum
1623+
current_tarball.checksum = checksum
16241624
current_tarball.size_in_storage = getattr(
16251625
current_tarball, field_to_copy
16261626
).size

app/grandchallenge/evaluation/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class EvaluationGroundTruthAdmin(admin.ModelAdmin):
238238
readonly_fields = (
239239
"creator",
240240
"phase",
241-
"sha256",
241+
"checksum",
242242
"size_in_storage",
243243
"ground_truth",
244244
)

app/grandchallenge/evaluation/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ def clean_algorithm(self):
490490

491491
if algorithm.active_model:
492492
extra_submission_filter = {
493-
"algorithm_model__sha256": algorithm.active_model.sha256
493+
"algorithm_model__checksum": algorithm.active_model.checksum
494494
}
495495
else:
496496
extra_submission_filter = {"algorithm_model__isnull": True}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generated by Django 5.2.12 on 2026-04-28 16:06
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
(
10+
"evaluation",
11+
"0105_remove_method_storage_cost_per_year_usd_millicents",
12+
),
13+
]
14+
15+
operations = [
16+
migrations.RenameField(
17+
model_name="evaluationgroundtruth",
18+
old_name="sha256",
19+
new_name="checksum",
20+
),
21+
]

app/grandchallenge/evaluation/templates/evaluation/evaluationgroundtruth_detail.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ <h2>Ground Truth</h2>
7575
<dd>{{ object.ground_truth.size|naturalsize }}</dd>
7676
{% endif %}
7777

78-
{% if object.sha256 %}
79-
<dt>SHA256</dt>
80-
<dd>{{ object.sha256 }}</dd>
78+
{% if object.checksum %}
79+
<dt>Checksum</dt>
80+
<dd>{{ object.checksum }}</dd>
8181
{% endif %}
8282

8383
<dt>Import Status</dt>

app/tests/algorithms_tests/factories.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Meta:
5353
algorithm = factory.SubFactory(AlgorithmFactory)
5454
creator = factory.SubFactory(UserFactory)
5555
model = factory.django.FileField()
56-
sha256 = factory.sequence(lambda n: hash_sha256(f"image{n}"))
56+
checksum = factory.sequence(lambda n: hash_sha256(f"image{n}"))
5757

5858

5959
class AlgorithmJobFactory(factory.django.DjangoModelFactory):

0 commit comments

Comments
 (0)