Skip to content

Cached heuristic name discrepancy #353

Closed
@mgxd

Description

@mgxd

Summary

When reconverting and using a different heuristic filename from the cache, the conversion table (filegroup.json) is still reused. This results in heudiconv ignoring the new heuristic and defaulting to the grouping from the previous heuristic. Relevant code excerpt:

target_heuristic_filename = op.join(idir, op.basename(heuristic.filename))
# TODO:
# 1. add a test
# 2. possibly extract into a dedicated function for easier logic flow here
# and a dedicated unittest
if (op.exists(target_heuristic_filename) and
file_md5sum(target_heuristic_filename) != file_md5sum(heuristic.filename)):
# remake conversion table
reuse_conversion_table = False

...and saving...
safe_copyfile(heuristic.filename, idir)

Proposed solution - save used heuristic in cache simply as heuristic.py to avoid any naming discrepancies.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions