Skip to content

Commit

Permalink
fix: caching process (#1225)
Browse files Browse the repository at this point in the history
* generalization of multiext output

* Reformatting

* Fixed caching of jobs/rules

* FMT

* Moved encoding into hash update

Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
  • Loading branch information
jafors and johanneskoester committed Oct 20, 2021
1 parent fc8c5f6 commit 0825a29
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions snakemake/caching/hash.py
Expand Up @@ -57,7 +57,7 @@ def _get_provenance_hash(self, job: Job):
wildcards=job.wildcards,
params=job.params,
)
h.update(source)
h.update(source.encode())
elif job.is_notebook:
_, source, _, _ = script.get_source(
job.rule.notebook,
Expand All @@ -66,16 +66,20 @@ def _get_provenance_hash(self, job: Job):
wildcards=job.wildcards,
params=job.params,
)
h.update(source)
h.update(source.encode())
elif job.is_wrapper:
_, source, _, _ = script.get_source(
wrapper.get_script(job.rule.wrapper, prefix=workflow.wrapper_prefix),
wrapper.get_script(
job.rule.wrapper,
sourcecahce=job.rule.workflow.sourcecache,
prefix=workflow.wrapper_prefix,
),
job.rule.workflow.sourcecache,
basedir=job.rule.basedir,
wildcards=job.wildcards,
params=job.params,
)
h.update(source)
h.update(source.encode())

# Hash params.
for key, value in sorted(job.params._allitems()):
Expand Down

0 comments on commit 0825a29

Please sign in to comment.