continue Stencila detection if /binder dir is present, improve

pull/457/head
nuest 2018-10-30 16:02:40 +01:00
rodzic 8d9a48717a
commit d6dc570a14
2 zmienionych plików z 8 dodań i 15 usunięć

Wyświetl plik

@ -272,9 +272,6 @@ class BuildPack:
self._stencila_manifest_dir = None
if os.path.exists('binder'):
return self._stencila_manifest_dir
for root, dirs, files in os.walk("."):
if "manifest.xml" in files:
self.log.debug("Found a manifest.xml at %s", root)
@ -294,10 +291,7 @@ class BuildPack:
# look at the content of the jats.xml file to extract the required execution contexts
self._stencila_manifest_contexts = None
if os.path.exists('binder'):
return self._stencila_manifest_contexts
self._stencila_manifest_contexts = []
for root, dirs, files in os.walk("."):
for filename in files:

Wyświetl plik

@ -79,14 +79,13 @@ class RBuildPack(PythonBuildPack):
return True
description_R = 'DESCRIPTION'
if not os.path.exists('binder'):
if os.path.exists(description_R) or (self.stencila_manifest_contexts and "r" in self.stencila_manifest_contexts):
if not self.checkpoint_date:
# no R snapshot date set through runtime.txt
# set the R runtime to the latest date that is guaranteed to be on MRAN across timezones
self._checkpoint_date = datetime.date.today() - datetime.timedelta(days=2)
self._runtime = "r-{}".format(str(self._checkpoint_date))
return True
if (not os.path.exists('binder') and os.path.exists(description_R)) or 'r' in self.stencila_manifest_contexts:
if not self.checkpoint_date:
# no R snapshot date set through runtime.txt
# set the R runtime to the latest date that is guaranteed to be on MRAN across timezones
self._checkpoint_date = datetime.date.today() - datetime.timedelta(days=2)
self._runtime = "r-{}".format(str(self._checkpoint_date))
return True
def get_path(self):
"""