From aa7fc55d35e7a9b9ad6387795722d9d0bb1b149d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=BCther?= Date: Wed, 17 Jul 2024 15:19:11 +0200 Subject: [PATCH] add home_dir_template to allow arbitrary locations --- nextflowspawner/__init__.py | 4 +++- setup.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nextflowspawner/__init__.py b/nextflowspawner/__init__.py index d56289b..c15a747 100644 --- a/nextflowspawner/__init__.py +++ b/nextflowspawner/__init__.py @@ -17,11 +17,13 @@ class NextflowSpawner(LocalProcessSpawner): workflow_url = Unicode(config=True, help="The url of the pipeline repository.") workflow_revision = Unicode('main', config=True, help="The revision of the pipeline repository.") + home_dir_template = Unicode('/home/{username}', config=True, help="Template to expand to set the user home. {username} is expanded to the jupyterhub username.") + home_dir = Unicode(help="The user home directory") @default('home_dir') def _default_home_dir(self): - return pwd.getpwnam(self.user.name).pw_dir + return self.home_dir_template.format(username=self.user.name) nxf_home = Unicode(help="The directory where nextflow assets are stored.") diff --git a/setup.py b/setup.py index fe51431..ed92ff3 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name="nextflowspawner", - version='0.7.2', + version='0.7.3', url="https://github.com/phue/nextflowspawner", description="Spawn Nextflow pipelines from Jupyterhub and configure them interactively", author="Patrick Hüther",