Skip to content

Commit 998704c

Browse files
authored
Provide task ID in provenance file (#9)
To facilitate a simplified access on the assigned task id of a dataset registration, the ID is now written into the provenance file.
1 parent f29d2ef commit 998704c

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ Here is an example of the provenance file:
130130
{
131131
"origin": "/Users/myuser/registration",
132132
"user": "/Users/myuser",
133-
"measurementId": "QTEST001AE-1234512312",
133+
"measurementId": "NGSQTEST001AE-1234512312",
134+
"datasetFiles" : [ "file1_1.fastq.gz", "file1_2.fastq.gz" ],
135+
"taskId": "74c5d26f-b756-42c3-b6f4-2b4825670a2d",
134136
"history": [
135137
"/opt/scanner-app/scanner-processing-dir/74c5d26f-b756-42c3-b6f4-2b4825670a2d"
136138
]
@@ -146,6 +148,10 @@ Here is an example of the provenance file:
146148
>
147149
> `measurementId`: any valid QBiC measurement ID that has been found in the dataset (this might
148150
> be `null`) in case the evaluation has not been done yet.
151+
>
152+
> `datasetFiles`: a list of relative file paths belonging to the dataset
153+
>
154+
> `taskId`: a unique task ID assigned by the application to track the dataset registration progress
149155
>
150156
> `history`: a list of history items, which steps have been performed. The list is ordered by first
151157
> processing steps being at the start and the latest at the end.

src/main/java/life/qbic/data/processing/Provenance.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ public class Provenance {
4747
@JsonProperty("datasetFiles")
4848
public List<String> datasetFiles;
4949

50+
@JsonProperty("taskId")
51+
public String taskId;
52+
5053
/**
5154
* A list of ordered processing folder stops the dataset has traversed and passed successfully.
5255
* <p>

src/main/java/life/qbic/data/processing/registration/ProcessRegistrationRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ private void writeProvenanceInformation(Path taskDir, Path newLocation,
182182
provenance.history.add(newLocation.toString());
183183
provenance.userWorkDirectoryPath = String.valueOf(request.userPath());
184184
provenance.qbicMeasurementID = measurementId;
185+
provenance.taskId = taskDir.toFile().getName();
185186
provenance.addDatasetFiles(datasetFiles);
186187
ObjectMapper mapper = new ObjectMapper();
187188
mapper.writerWithDefaultPrettyPrinter()

0 commit comments

Comments
 (0)