Skip to content

Commit

Permalink
Remove input_files/output_files from runs
Browse files Browse the repository at this point in the history
They are still read from the input config file, they are just not
present in the output config object.
  • Loading branch information
remram44 committed Aug 12, 2021
1 parent 774263e commit e693636
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
12 changes: 0 additions & 12 deletions reprozip-core/reprozip_core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,6 @@ def load_config(filename, canonical):

inputs_outputs = load_iofiles(config, runs)

# reprozip < 0.7 compatibility: set inputs/outputs on runs (for plugins)
for i, run in enumerate(runs):
run['input_files'] = dict((n, f.path)
for n, f in inputs_outputs.items()
if i in f.read_runs)
run['output_files'] = dict((n, f.path)
for n, f in inputs_outputs.items()
if i in f.write_runs)

# reprozip < 0.8 compatibility: assign IDs to runs
for i, run in enumerate(runs):
if run.get('id') is None:
Expand Down Expand Up @@ -588,9 +579,6 @@ def save_config(filename, runs, packages, other_files, reprozip_version,

fp.write("runs:\n")
for i, run in enumerate(runs):
# Remove reprozip < 0.7 compatibility fields
run = dict((k, v) for k, v in run.items()
if k not in ('input_files', 'output_files'))
fp.write("# Run %d\n" % i)
fp.write(dump([run]).decode('utf-8'))
fp.write("\n")
Expand Down
28 changes: 0 additions & 28 deletions tests/test_reprozip.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,6 @@ def test_load_0_4_1(self):
'system': ['Linux', '5.4.0-80-generic'],
'uid': 1000,
'workingdir': '/home/remram',
'input_files': {
'text': PurePosixPath('/tmp/input.txt'),
},
'output_files': {
'lines': PurePosixPath('/tmp/lines'),
},
}
])
self.assertEqual(config.inputs_outputs, {
Expand Down Expand Up @@ -188,12 +182,6 @@ def test_load_0_4_1(self):
'system': ['Linux', '5.4.0-80-generic'],
'uid': 1000,
'workingdir': '/home/remram',
'input_files': {
'text': PurePosixPath('/tmp/input.txt'),
},
'output_files': {
'lines': PurePosixPath('/tmp/lines'),
},
}
])
self.assertEqual(config.inputs_outputs, {
Expand Down Expand Up @@ -234,14 +222,6 @@ def test_load_0_8(self):
'system': ['Linux', '5.4.0-80-generic'],
'uid': 1000,
'workingdir': '/home/remram',
'input_files': {
'text': PurePosixPath('/tmp/input.txt'),
'other': PurePosixPath('/tmp/other'),
},
'output_files': {
'lines': PurePosixPath('/tmp/lines'),
'other': PurePosixPath('/tmp/other'),
},
}
])
self.assertEqual(config.inputs_outputs, {
Expand Down Expand Up @@ -283,14 +263,6 @@ def test_load_0_8(self):
'system': ['Linux', '5.4.0-80-generic'],
'uid': 1000,
'workingdir': '/home/remram',
'input_files': {
'text': PurePosixPath('/tmp/input.txt'),
'other': PurePosixPath('/tmp/other'),
},
'output_files': {
'lines': PurePosixPath('/tmp/lines'),
'other': PurePosixPath('/tmp/other'),
},
}
])
self.assertEqual(config.inputs_outputs, {
Expand Down

0 comments on commit e693636

Please sign in to comment.