reformat some long lines
MODIFY
repo2docker/buildpacks/base.py
repo2docker/buildpacks/base.py
@@ -258,7 +258,6 @@ class BuildPack:
"""
return {}
-
@property
def stencila_manifest_dir(self):
"""Find the stencila manifest dir if it exists"""
@@ -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.

MODIFY
repo2docker/buildpacks/r.py
repo2docker/buildpacks/r.py
@@ -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)

reformat some long lines