From 4984e765842bc1606f96c47f0b4c239126657098 Mon Sep 17 00:00:00 2001 From: yacchin1205 <968739+yacchin1205@users.noreply.github.com> Date: Wed, 22 Jun 2022 14:30:51 +0900 Subject: [PATCH 1/2] Add rdm.nii.ac.jp to hosts --- tljh_repo2docker/__init__.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tljh_repo2docker/__init__.py b/tljh_repo2docker/__init__.py index b6bd1be..c4f11b5 100644 --- a/tljh_repo2docker/__init__.py +++ b/tljh_repo2docker/__init__.py @@ -1,3 +1,4 @@ +import json import os from aiodocker import Docker @@ -390,21 +391,25 @@ def tljh_custom_jupyterhub_config(c): 'rdm': RDMProvider, 'weko3': WEKO3Provider, } - c.RDMProvider.hosts = [ + rdm_provider_hosts = [ { 'hostname': ["https://osf.io/"], 'api': "https://api.osf.io/v2/" }, { - 'hostname': ["https://bh.rdm.yzwlab.com/"], - 'api': "https://api.bh.rdm.yzwlab.com/v2/", + 'hostname': ["https://rdm.nii.ac.jp"], + 'api': "https://api.rdm.nii.ac.jp/v2/", }, { 'hostname': ["https://rcos.rdm.nii.ac.jp"], 'api': "https://api.rcos.rdm.nii.ac.jp/v2/", }, ] - + custom_hosts = os.environ.get('REPO2DOCKER_RDM_PROVIDER_HOSTS', None) + if custom_hosts is not None: + rdm_provider_hosts = json.loads(custom_hosts) + c.RDMProvider.hosts = rdm_provider_hosts + # register the handlers to manage the user images c.JupyterHub.extra_handlers.extend( [ From a02429fdb4bad8c1f76b98d004b90c1e0145293d Mon Sep 17 00:00:00 2001 From: yacchin1205 <968739+yacchin1205@users.noreply.github.com> Date: Wed, 22 Jun 2022 14:43:53 +0900 Subject: [PATCH 2/2] Update version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3c564be..00a96a7 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="tljh-repo2docker", - version="0.0.1", + version="0.0.2", entry_points={"tljh": ["tljh_repo2docker = tljh_repo2docker"]}, packages=find_packages(), include_package_data=True,