kopia lustrzana https://github.com/jupyterhub/repo2docker
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.cipull/1285/head
rodzic
49bdc6c048
commit
18e76f9d38
|
@ -13,6 +13,7 @@ from .python import PythonBuildPack
|
|||
# that seems to have a working IRKernel.
|
||||
RSPM_CUTOFF_DATE = datetime.date(2018, 12, 7)
|
||||
|
||||
|
||||
class RBuildPack(PythonBuildPack):
|
||||
"""
|
||||
Setup R for use with a repository
|
||||
|
@ -270,9 +271,9 @@ class RBuildPack(PythonBuildPack):
|
|||
"""
|
||||
if self.checkpoint_date < RSPM_CUTOFF_DATE:
|
||||
raise RuntimeError(
|
||||
f'Microsoft killed MRAN, the source of R package snapshots before {RSPM_CUTOFF_DATE.strftime("%Y-%m-%d")}. '\
|
||||
f'This repo has a snapshot date of {self.checkpoint_date.strftime("%Y-%m-%d")} specified in runtime.txt. '\
|
||||
'Please use a newer snapshot date'
|
||||
f'Microsoft killed MRAN, the source of R package snapshots before {RSPM_CUTOFF_DATE.strftime("%Y-%m-%d")}. '
|
||||
f'This repo has a snapshot date of {self.checkpoint_date.strftime("%Y-%m-%d")} specified in runtime.txt. '
|
||||
"Please use a newer snapshot date"
|
||||
)
|
||||
|
||||
cran_mirror_url = self.get_rspm_snapshot_url(self.checkpoint_date)
|
||||
|
|
|
@ -78,8 +78,11 @@ def test_mran_dead(tmpdir, base_image):
|
|||
tmpdir.chdir()
|
||||
|
||||
with open("runtime.txt", "w") as f:
|
||||
f.write('r-3.6-2017-06-04')
|
||||
f.write("r-3.6-2017-06-04")
|
||||
|
||||
r = buildpacks.RBuildPack(base_image)
|
||||
with pytest.raises(RuntimeError, match=r'^Microsoft killed MRAN, the source of R package snapshots before 2018-12-07.*'):
|
||||
r.get_build_scripts()
|
||||
with pytest.raises(
|
||||
RuntimeError,
|
||||
match=r"^Microsoft killed MRAN, the source of R package snapshots before 2018-12-07.*",
|
||||
):
|
||||
r.get_build_scripts()
|
||||
|
|
Ładowanie…
Reference in New Issue