Skip to content

Commit ff81500

Browse files
committed
Remove unused properties from data model
Signed-off-by: Ben Sherman <[email protected]>
1 parent 3b97c36 commit ff81500

File tree

8 files changed

+7
-25
lines changed

8 files changed

+7
-25
lines changed

modules/nf-lineage/src/main/nextflow/lineage/LinObserver.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ class LinObserver implements TraceObserver {
228228
normalizer.normalizePath(task.getCondaEnv()),
229229
normalizer.normalizePath(task.getSpackEnv()),
230230
task.config?.getArchitecture()?.toString(),
231-
task.processor.getTaskGlobalVars(task),
232231
task.processor.getTaskBinEntries(task.source).collect { Path p -> new DataPath(
233232
normalizer.normalizePath(p.normalize()),
234233
Checksum.ofNextflow(p) )

modules/nf-lineage/src/main/nextflow/lineage/LinPropertyValidator.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import groovy.transform.CompileStatic
2020
import nextflow.lineage.model.Annotation
2121
import nextflow.lineage.model.Checksum
2222
import nextflow.lineage.model.DataPath
23+
import nextflow.lineage.model.FileOutput
2324
import nextflow.lineage.model.Parameter
2425
import nextflow.lineage.model.TaskRun
2526
import nextflow.lineage.model.Workflow
@@ -37,8 +38,8 @@ class LinPropertyValidator {
3738
private static final List<Class> LIN_MODEL_CLASSES = [
3839
Annotation,
3940
Checksum,
40-
DataOutput,
4141
DataPath,
42+
FileOutput,
4243
Parameter,
4344
TaskRun,
4445
Workflow,

modules/nf-lineage/src/main/nextflow/lineage/model/TaskRun.groovy

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ class TaskRun implements LinSerializable {
6464
* Architecture defined in the Spack environment used for the task run
6565
*/
6666
String architecture
67-
/**
68-
* Global variables defined in the task run
69-
*/
70-
Map globalVars
7167
/**
7268
* Binaries used in the task run
7369
*/
@@ -76,8 +72,4 @@ class TaskRun implements LinSerializable {
7672
* Workflow launch associated to the task run
7773
*/
7874
String workflowLaunch
79-
/**
80-
* Annotations attached to the task run
81-
*/
82-
List<Annotation> annotations
8375
}

modules/nf-lineage/src/main/nextflow/lineage/model/WorkflowLaunch.groovy

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,4 @@ class WorkflowLaunch implements LinSerializable {
4848
* Resolved Configuration
4949
*/
5050
Map config
51-
/**
52-
* Annotations attached to the workflow run
53-
*/
54-
List<Annotation> annotations
5551
}

modules/nf-lineage/src/main/nextflow/lineage/model/WorkflowRun.groovy

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,4 @@ class WorkflowRun implements LinSerializable {
4242
* Workflow output
4343
*/
4444
List<Parameter> output
45-
/**
46-
* Annotations attached to the workflow outputs
47-
*/
48-
List<Annotation> annotations
4945
}

modules/nf-lineage/src/test/nextflow/lineage/LinObserverTest.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ class LinObserverTest extends Specification {
240240
Files.createDirectories(taskWd)
241241
and:
242242
def processor = Mock(TaskProcessor){
243-
getTaskGlobalVars(_) >> [:]
244243
getTaskBinEntries(_) >> []
245244
}
246245

@@ -298,7 +297,7 @@ class LinObserverTest extends Specification {
298297
new Parameter("path", "file1", ['lid://78567890/file1.txt']),
299298
new Parameter("path", "file2", [[path: normalizer.normalizePath(file), checksum: [value:fileHash, algorithm: "nextflow", mode: "standard"]]]),
300299
new Parameter("val", "id", "value")
301-
], null, null, null, null, [:], [], "lid://hash", null)
300+
], null, null, null, null, [], "lid://hash")
302301
def dataOutput1 = new FileOutput(outFile1.toString(), new Checksum(fileHash1, "nextflow", "standard"),
303302
"lid://1234567890", "lid://hash", "lid://1234567890", attrs1.size(), LinUtils.toDate(attrs1.creationTime()), LinUtils.toDate(attrs1.lastModifiedTime()) )
304303
def dataOutput2 = new FileOutput(outFile2.toString(), new Checksum(fileHash2, "nextflow", "standard"),

modules/nf-lineage/src/test/nextflow/lineage/cli/LinCommandImplTest.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,15 @@ class LinCommandImplTest extends Specification{
185185
new Parameter("path","reads", ["lid://45678/output.txt"] ),
186186
new Parameter("path","input", [new DataPath("path/to/file",new Checksum("45372qe","nextflow","standard"))])
187187
],
188-
null, null, null, null, [:],[], null)
188+
null, null, null, null, [], null)
189189
lidFile3.text = encoder.encode(entry)
190190
entry = new FileOutput("path/to/file",new Checksum("45372qe","nextflow","standard"),
191191
"lid://45678", "lid://45678", null, 1234, time, time, null)
192192
lidFile4.text = encoder.encode(entry)
193193
entry = new TaskRun("u345-2346-1stw2", "bar",
194194
new Checksum("abfs2556","nextflow","standard"),
195195
'this is a script',
196-
null,null, null, null, null, [:],[], null)
196+
null,null, null, null, null, [], null)
197197
lidFile5.text = encoder.encode(entry)
198198
final network = """flowchart BT
199199
lid://12345/file.bam@{shape: document, label: "lid://12345/file.bam"}

modules/nf-lineage/src/test/nextflow/lineage/serde/LinEncoderTest.groovy

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class LinEncoderTest extends Specification{
108108
def taskRun = new TaskRun(
109109
uniqueId.toString(),"name", new Checksum("78910", "nextflow", "standard"), 'this is a script',
110110
[new Parameter("String", "param1", "value1")], "container:version", "conda", "spack", "amd64",
111-
[a: "A", b: "B"], [new DataPath("path/to/file", new Checksum("78910", "nextflow", "standard"))]
111+
[new DataPath("path/to/file", new Checksum("78910", "nextflow", "standard"))]
112112
)
113113
when:
114114
def encoded = encoder.encode(taskRun)
@@ -126,7 +126,6 @@ class LinEncoderTest extends Specification{
126126
result.conda == "conda"
127127
result.spack == "spack"
128128
result.architecture == "amd64"
129-
result.globalVars == [a: "A", b: "B"]
130129
result.binEntries.size() == 1
131130
result.binEntries.get(0).path == "path/to/file"
132131
result.binEntries.get(0).checksum.value == "78910"
@@ -141,7 +140,7 @@ class LinEncoderTest extends Specification{
141140
def encoded = encoder.encode(wfResults)
142141
def object = encoder.decode(encoded)
143142
then:
144-
encoded == '{"type":"WorkflowRun","createdAt":null,"launch":"lid://1234","output":null,"annotations":null}'
143+
encoded == '{"type":"WorkflowRun","createdAt":null,"launch":"lid://1234","output":null}'
145144
def result = object as WorkflowRun
146145
result.createdAt == null
147146

0 commit comments

Comments
 (0)