Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: caching process #1225

Merged
merged 7 commits into from Oct 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo:

Suggested change
sourcecahce=job.rule.workflow.sourcecache,
sourcecache=job.rule.workflow.sourcecache,

. Apparently the test suite didn't catch this -- @jafors, could you add a test so we could get coverage here?

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