Skip to content

Commit

Permalink
Merge pull request #111 from IndicoDataSolutions/include_deleted_prop…
Browse files Browse the repository at this point in the history
…erty

added deleted property to submission object
  • Loading branch information
Scott771 authored Aug 11, 2021
2 parents 59eced7 + ead6806 commit 0997d23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions indico/queries/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class ListSubmissions(GraphQLRequest):
inputFile
inputFilename
resultFile
deleted
retrieved
errors
}
Expand Down Expand Up @@ -113,6 +114,7 @@ class GetSubmission(GraphQLRequest):
inputFilename
resultFile
retrieved
deleted
errors
}
}
Expand Down Expand Up @@ -152,6 +154,7 @@ class WaitForSubmissions(RequestChain):
inputFilename
resultFile
retrieved
deleted
errors
}
}
Expand Down Expand Up @@ -210,6 +213,7 @@ class UpdateSubmission(GraphQLRequest):
inputFilename
resultFile
retrieved
deleted
errors
}
}
Expand Down
3 changes: 2 additions & 1 deletion indico/types/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class Submission(BaseType):
result_file (str): URL of the result datafile within the Indico Platform
retrieved (bool): Whether the submission has been retrieved by a user
This flag is set manually by users.
deleted (bool): Whether the submission result has been deleted from the server
errors (str): Any errors raised while processing the submission
retries (List[SubmissionRetries]): If requested, information about previous retries of this submission.
"""

id: int
Expand All @@ -68,5 +68,6 @@ class Submission(BaseType):
input_filename: str
result_file: str
retrieved: bool
deleted: bool
errors: str
retries: List[SubmissionRetries]
6 changes: 5 additions & 1 deletion tests/integration/queries/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from indico.queries.workflow import GetWorkflow
import pytest
from pathlib import Path
import time

from indico.client import IndicoClient
from indico.errors import IndicoError, IndicoInputError
Expand Down Expand Up @@ -93,9 +94,12 @@ def test_workflow_submission(
assert isinstance(result, dict)
assert result["submission_id"] == submission_id
assert result["file_version"] == 1
client.call(UpdateSubmission(submission_id, retrieved=True))
sub = client.call(GetSubmission(submission_id))
assert isinstance(sub, Submission)
assert sub.retrieved is False
assert sub.deleted is False
client.call(UpdateSubmission(submission_id, retrieved=True))
sub = client.call(GetSubmission(submission_id))
assert sub.retrieved is True

def test_workflow_submission_with_streams(
Expand Down

0 comments on commit 0997d23

Please sign in to comment.