From c26bd9eab8a347de6ac044cb4f368a8c26943f0c Mon Sep 17 00:00:00 2001 From: Juan Medina Date: Tue, 16 Oct 2018 14:13:13 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20change=20default=20dirs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- register_toil/VERSION | 2 +- register_toil/cli.py | 10 ++++++---- tests/test_cli.py | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/register_toil/VERSION b/register_toil/VERSION index 45a1b3f..781dcb0 100644 --- a/register_toil/VERSION +++ b/register_toil/VERSION @@ -1 +1 @@ -1.1.2 +1.1.3 diff --git a/register_toil/cli.py b/register_toil/cli.py index 264430d..fa06a6a 100644 --- a/register_toil/cli.py +++ b/register_toil/cli.py @@ -25,6 +25,8 @@ from register_toil import __version__ from register_toil import utils +_DEFAULT_OPTDIR = "/work/isabl/local" +_DEFAULT_BINDIR = "/work/isabl/bin" _DEFAULT_VOLUMES = ( ("/ifs", "/ifs"), ("/juno", "/juno"), @@ -50,14 +52,14 @@ show_default=True, type=click.Path(resolve_path=True, dir_okay=True), help="path were executables will be linked to", - default=os.getenv("TOIL_REGISTER_BIN", "/work/isabl/local/bin"), + default=os.getenv("TOIL_REGISTER_BIN", _DEFAULT_BINDIR), ) @click.option( "--optdir", show_default=True, type=click.Path(resolve_path=True, dir_okay=True), help="path were images will be versioned and cached", - default=os.getenv("TOIL_REGISTER_OPT", "/work/isabl/local/opt"), + default=os.getenv("TOIL_REGISTER_OPT", _DEFAULT_OPTDIR), ) @click.option( "--python", @@ -189,14 +191,14 @@ def register_toil( show_default=True, type=click.Path(resolve_path=True, dir_okay=True), help="path were executables will be linked to", - default=os.getenv("TOIL_REGISTER_BIN", "/work/isabl/local/bin"), + default=os.getenv("TOIL_REGISTER_BIN", _DEFAULT_BINDIR), ) @click.option( "--optdir", show_default=True, type=click.Path(resolve_path=True, dir_okay=True), help="path were images will be versioned and cached", - default=os.getenv("TOIL_REGISTER_OPT", "/work/isabl/local/opt"), + default=os.getenv("TOIL_REGISTER_OPT", _DEFAULT_OPTDIR), ) @click.option( "--tmpvar", diff --git a/tests/test_cli.py b/tests/test_cli.py index 81bf200..99f539e 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -9,7 +9,7 @@ from register_toil import cli -def __test_register_toil(tmpdir): +def test_register_toil(tmpdir): """Sample test for register_toil command.""" runner = CliRunner() optdir = tmpdir.mkdir("opt")