Skip to content

Commit 0997d23

Browse files
authored
Merge pull request #111 from IndicoDataSolutions/include_deleted_property
added deleted property to submission object
2 parents 59eced7 + ead6806 commit 0997d23

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

indico/queries/submission.py

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class ListSubmissions(GraphQLRequest):
5555
inputFile
5656
inputFilename
5757
resultFile
58+
deleted
5859
retrieved
5960
errors
6061
}
@@ -113,6 +114,7 @@ class GetSubmission(GraphQLRequest):
113114
inputFilename
114115
resultFile
115116
retrieved
117+
deleted
116118
errors
117119
}
118120
}
@@ -152,6 +154,7 @@ class WaitForSubmissions(RequestChain):
152154
inputFilename
153155
resultFile
154156
retrieved
157+
deleted
155158
errors
156159
}
157160
}
@@ -210,6 +213,7 @@ class UpdateSubmission(GraphQLRequest):
210213
inputFilename
211214
resultFile
212215
retrieved
216+
deleted
213217
errors
214218
}
215219
}

indico/types/submission.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ class Submission(BaseType):
5454
result_file (str): URL of the result datafile within the Indico Platform
5555
retrieved (bool): Whether the submission has been retrieved by a user
5656
This flag is set manually by users.
57+
deleted (bool): Whether the submission result has been deleted from the server
5758
errors (str): Any errors raised while processing the submission
5859
retries (List[SubmissionRetries]): If requested, information about previous retries of this submission.
59-
6060
"""
6161

6262
id: int
@@ -68,5 +68,6 @@ class Submission(BaseType):
6868
input_filename: str
6969
result_file: str
7070
retrieved: bool
71+
deleted: bool
7172
errors: str
7273
retries: List[SubmissionRetries]

tests/integration/queries/test_workflow.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from indico.queries.workflow import GetWorkflow
44
import pytest
55
from pathlib import Path
6+
import time
67

78
from indico.client import IndicoClient
89
from indico.errors import IndicoError, IndicoInputError
@@ -93,9 +94,12 @@ def test_workflow_submission(
9394
assert isinstance(result, dict)
9495
assert result["submission_id"] == submission_id
9596
assert result["file_version"] == 1
96-
client.call(UpdateSubmission(submission_id, retrieved=True))
9797
sub = client.call(GetSubmission(submission_id))
9898
assert isinstance(sub, Submission)
99+
assert sub.retrieved is False
100+
assert sub.deleted is False
101+
client.call(UpdateSubmission(submission_id, retrieved=True))
102+
sub = client.call(GetSubmission(submission_id))
99103
assert sub.retrieved is True
100104

101105
def test_workflow_submission_with_streams(

0 commit comments

Comments
 (0)