Skip to content

Commit 2fc2dd4

Browse files
[SNC-14] add: input files to Submissions (#287)
* add: filterable and pageable datasets * add: unit test * fix: happy path * fix: import fixture * add: input files to fetched submissions --------- Co-authored-by: micah cahill <[email protected]>
1 parent dbfa802 commit 2fc2dd4

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

indico/queries/submission.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ class ListSubmissions(PagedRequest):
5757
datasetId
5858
workflowId
5959
status
60+
inputFiles {
61+
id
62+
filename
63+
filepath
64+
filetype
65+
fileSize
66+
numPages
67+
}
6068
inputFile
6169
inputFilename
6270
resultFile
@@ -128,6 +136,14 @@ class GetSubmission(GraphQLRequest):
128136
datasetId
129137
workflowId
130138
status
139+
inputFiles {
140+
id
141+
filename
142+
filepath
143+
filetype
144+
fileSize
145+
numPages
146+
}
131147
inputFile
132148
inputFilename
133149
resultFile
@@ -171,6 +187,14 @@ class WaitForSubmissions(RequestChain):
171187
datasetId
172188
workflowId
173189
status
190+
inputFiles {
191+
id
192+
filename
193+
filepath
194+
filetype
195+
fileSize
196+
numPages
197+
}
174198
inputFile
175199
inputFilename
176200
resultFile
@@ -231,6 +255,14 @@ class UpdateSubmission(GraphQLRequest):
231255
datasetId
232256
workflowId
233257
status
258+
inputFiles {
259+
id
260+
filename
261+
filepath
262+
filetype
263+
fileSize
264+
numPages
265+
}
234266
inputFile
235267
inputFilename
236268
resultFile

indico/types/submission_file.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@ class SubmissionFile(BaseType):
1010
1111
Attributes:
1212
id (int): The Submission file id
13-
filepath (str): URL of the input datafile within the Indico Platform.
14-
filename (str): Name of the original file
1513
submission_id (int): The parent Submission id
14+
filename (str): Name of the original file
15+
filepath (str): URL of the input datafile within the Indico Platform.
16+
filetype (str): The file type of the original file; most likely, this is "PDF".
1617
file_size (int): Size of file, in bytes
1718
num_pages (int): Number of pages in file
1819
"""
1920

2021
id: int
21-
filepath: str
22-
filename: str
2322
submission_id: int
23+
filename: str
24+
filepath: str
25+
filetype: str
2426
file_size: int
2527
num_pages: int

0 commit comments

Comments
 (0)