Skip to content
Permalink
Browse files
fix: fix source retrieval during between workflow caching and report …
…generation
  • Loading branch information
johanneskoester committed Sep 29, 2021
1 parent b6b9b4b commit 2394ca4a23a6b2792397bc9efc09945f01d1963b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
@@ -52,6 +52,7 @@ def _get_provenance_hash(self, job: Job):
elif job.is_script:
_, source, _ = script.get_source(
job.rule.script,
job.rule.workflow.sourcecache,
basedir=job.rule.basedir,
wildcards=job.wildcards,
params=job.params,
@@ -60,6 +61,7 @@ def _get_provenance_hash(self, job: Job):
elif job.is_notebook:
_, source, _ = script.get_source(
job.rule.notebook,
job.rule.workflow.sourcecache,
basedir=job.rule.basedir,
wildcards=job.wildcards,
params=job.params,
@@ -68,6 +70,7 @@ def _get_provenance_hash(self, job: Job):
elif job.is_wrapper:
_, source, _ = script.get_source(
wrapper.get_script(job.rule.wrapper, prefix=workflow.wrapper_prefix),
job.rule.workflow.sourcecache,
basedir=job.rule.basedir,
wildcards=job.wildcards,
params=job.params,
@@ -261,7 +261,7 @@ def code(self):
elif self._rule.script is not None and not contains_wildcard(self._rule.script):
logger.info("Loading script code for rule {}".format(self.name))
_, source, language = script.get_source(
self._rule.script, self._rule.basedir
self._rule.script, self._rule.workflow.sourcecache, self._rule.basedir
)
sources = [source.decode()]
elif self._rule.wrapper is not None and not contains_wildcard(
@@ -270,15 +270,17 @@ def code(self):
logger.info("Loading wrapper code for rule {}".format(self.name))
_, source, language = script.get_source(
wrapper.get_script(
self._rule.wrapper, prefix=self._rule.workflow.wrapper_prefix
self._rule.wrapper,
self._rule.workflow.sourcecache,
prefix=self._rule.workflow.wrapper_prefix,
)
)
sources = [source.decode()]
elif self._rule.notebook is not None and not contains_wildcard(
self._rule.notebook
):
_, source, language = script.get_source(
self._rule.notebook, self._rule.basedir
self._rule.notebook, self._rule.workflow.sourcecache, self._rule.basedir
)
language = language.split("_")[1]
sources = notebook.get_cell_sources(source)

0 comments on commit 2394ca4

Please sign in to comment.