Commit 08385b5a authored by Samuel GAIST's avatar Samuel GAIST
Browse files

Merge branch 'more_info_from_caches' into '1.4.x'

Add more information to caches command output

See merge request !23
parents b0952911 a45c8106
Pipeline #20152 passed with stages
in 40 minutes and 41 seconds
......@@ -322,36 +322,49 @@ def caches(configuration, name, ls, delete, checksum):
scheduled = experiment.setup()
s = []
block_list = []
for key, value in scheduled.items():
block = {
'name': key,
'algorithm': value['configuration']['algorithm'],
'is_analyser': False,
'paths': []
if 'outputs' in value['configuration']: # normal block
for name, data in value['configuration']['outputs'].items():
else: # analyzer
block['is_analyser'] = True
# prefix cache path
s = [os.path.join(configuration.cache, k) for k in s]
for k in s:"output: `%s'", k)
for block in block_list:
block_type = 'analyzer' if block['is_analyser'] else 'algorithm'"block: `%s'", block['name'])" %s: `%s'", block_type, block['algorithm'])
if ls:
for g in glob.glob(k + '.*'):
for path in block['paths']:
# prefix cache path
path = os.path.join(configuration.cache, path)" output: `%s'", path)
if delete:
if ls:
for file in glob.glob(path + '.*'):' %s' % file)
for g in glob.glob(k + '.*'):"removing `%s'...", g)
if delete:
for file in glob.glob(path + '.*'):"removing `%s'...", file)
os.path.dirname(k), configuration.cache)
os.path.dirname(path), configuration.cache)
if checksum:
assert load_data_index(configuration.cache, k + '.data')"index for `%s' can be loaded and checksums", k)
if checksum:
assert load_data_index(configuration.cache, path + '.data')"index for `%s' can be loaded and checksums", path)
return 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment