From ad949b655e0e928b630d11ade1b853a2825980fd Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 2 Apr 2024 19:09:57 -0300 Subject: [PATCH] rm unoused function --- roles/jupyterhub/templates/jupyterhub_config.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/roles/jupyterhub/templates/jupyterhub_config.py b/roles/jupyterhub/templates/jupyterhub_config.py index c0c8a089..20bf6976 100644 --- a/roles/jupyterhub/templates/jupyterhub_config.py +++ b/roles/jupyterhub/templates/jupyterhub_config.py @@ -17,21 +17,6 @@ from jupyterhub.traitlets import Callable from tornado import gen -# Find all conda environments that have dask jupyterlab, batchspawner, and jupyterhub installed -jupyterlab_packages = ['jupyterlab', 'batchspawner', 'jupyterhub'] -def conda_envs_w_packages(packages, names_only=False): - _environments = [] - output = subprocess.check_output(['conda', 'env', 'list', '--json']) - environments = json.loads(output)['envs'] - for environment in environments: - output = subprocess.check_output(['conda', 'list', '-p', environment, '--json']) - if set(packages) <= {_['name'] for _ in json.loads(output)}: - _environments.append((os.path.basename(environment), environment)) - if names_only: - return [env_name for env_name, path in _environments] - return _environments - - # Allow gathering of jupyterhub prometheus metrics c.JupyterHub.authenticate_prometheus = False