Skip to content

Commit 6595763

Browse files
committed
Rename to civ_data_objects
1 parent 55448c2 commit 6595763

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

app/grandchallenge/algorithms/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ def create(
926926
def get_jobs_with_same_inputs(
927927
self, *, inputs, algorithm_image, algorithm_model
928928
):
929-
existing_civs = self.retrieve_existing_civs(values=inputs)
929+
existing_civs = self.retrieve_existing_civs(civ_data_objects=inputs)
930930
unique_kwargs = {
931931
"algorithm_image": algorithm_image,
932932
}

app/grandchallenge/components/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,13 +1521,13 @@ def only_completed(self):
15211521
)
15221522

15231523
@staticmethod
1524-
def retrieve_existing_civs(*, values):
1524+
def retrieve_existing_civs(*, civ_data_objects):
15251525
"""
1526-
Checks if there are existing CIVs for the provided data and returns those.
1526+
Check if there are existing CIVs for the provided data and returns those.
15271527
15281528
Parameters
15291529
----------
1530-
values
1530+
civ_data_objects
15311531
A list of CIVData objects.
15321532
15331533
Returns
@@ -1536,7 +1536,7 @@ def retrieve_existing_civs(*, values):
15361536
15371537
"""
15381538
existing_civs = []
1539-
for civ_data in values:
1539+
for civ_data in civ_data_objects:
15401540
if (
15411541
civ_data.user_upload
15421542
or civ_data.upload_session

app/grandchallenge/evaluation/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,7 @@ def get_evaluations_with_same_inputs(
18451845
requires_gpu_type,
18461846
requires_memory_gb,
18471847
):
1848-
existing_civs = self.retrieve_existing_civs(values=inputs)
1848+
existing_civs = self.retrieve_existing_civs(civ_data_objects=inputs)
18491849
unique_kwargs = {
18501850
"submission": submission,
18511851
"method": method,

app/tests/algorithms_tests/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ def test_retrieve_existing_civs(
585585
),
586586
}
587587

588-
civs = Job.objects.retrieve_existing_civs(values=data)
588+
civs = Job.objects.retrieve_existing_civs(civ_data_objects=data)
589589

590590
assert civs == [
591591
item

0 commit comments

Comments
 (0)