Skip to content

Commit

Permalink
add home_dir_template to allow arbitrary locations
Browse files Browse the repository at this point in the history
  • Loading branch information
phue committed Jul 17, 2024
1 parent 109eabb commit aa7fc55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion nextflowspawner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit aa7fc55

Please sign in to comment.