reformat some long lines

pull/457/head
nuest 2018-11-09 07:40:39 +01:00
rodzic 58a5c8b4c2
commit 68194a08a2
2 zmienionych plików z 18 dodań i 15 usunięć

Wyświetl plik

@ -258,7 +258,6 @@ class BuildPack:
"""
return {}
@property
def stencila_manifest_dir(self):
"""Find the stencila manifest dir if it exists"""
@ -320,7 +319,7 @@ class BuildPack:
self._stencila_contexts,
)
break
return self._stencila_contexts
def get_build_scripts(self):
@ -387,9 +386,9 @@ class BuildPack:
This script is added as the `ENTRYPOINT` to the container.
It is run as a non-root user, and must be executable. Used for performing
run time steps that can not be performed with standard tools. For example
setting environment variables for your repository.
It is run as a non-root user, and must be executable. Used for
performing run time steps that can not be performed with standard
tools. For example setting environment variables for your repository.
The script should be as deterministic as possible - running it twice
should not produce different results.
@ -514,9 +513,9 @@ class BaseImage(BuildPack):
env = []
if self.stencila_manifest_dir:
# manifest_dir is the path containing the manifest.xml
# archive_dir is the directory containing archive directories (one level up)
# default archive is the name of the directory in the archive_dir
# such that
# archive_dir is the directory containing archive directories
# (one level up) default archive is the name of the directory
# in the archive_dir such that
# ${STENCILA_ARCHIVE_DIR}/${STENCILA_ARCHIVE}/manifest.xml
# exists.

Wyświetl plik

@ -74,9 +74,9 @@ class RBuildPack(PythonBuildPack):
"""
Check if current repo should be built with the R Build pack
super().detect() is not called in this function - it would return false
unless a `requirements.txt` is present and we do not want to require the
presence of a `requirements.txt` to use R.
super().detect() is not called in this function - it would return
false unless a `requirements.txt` is present and we do not want
to require the presence of a `requirements.txt` to use R.
"""
# If no date is found, then self.checkpoint_date will be False
# Otherwise, it'll be a date object, which will evaluate to True
@ -84,10 +84,12 @@ class RBuildPack(PythonBuildPack):
return True
description_R = 'DESCRIPTION'
if (not os.path.exists('binder') and os.path.exists(description_R)) or 'r' in self.stencila_contexts:
if ((not os.path.exists('binder') and os.path.exists(description_R))
or 'r' in self.stencila_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
# 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
@ -140,9 +142,11 @@ class RBuildPack(PythonBuildPack):
This sets up:
- A directory owned by non-root in ${R_LIBS_USER} for installing R packages into
- A directory owned by non-root in ${R_LIBS_USER}
for installing R packages into
- RStudio
- R's devtools package, at a particular frozen version (determined by MRAN)
- R's devtools package, at a particular frozen version
(determined by MRAN)
- IRKernel
- nbrsessionproxy (to access RStudio via Jupyter Notebook)
- stencila R package (if Stencila document with R code chunks detected)