Skip to content

Commit

Permalink
Merge branch 'maint-0.7'
Browse files Browse the repository at this point in the history
* maint-0.7:
  release: 0.7.2
  cli: remove traling slash from reana server url
  • Loading branch information
mvidalgarcia committed Feb 15, 2021
2 parents 6499923 + 14b2210 commit 03460b7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ Version 0.8.0 (UNRELEASED)
- Changes ``delete`` to prevent workflow hard deletion.
- Changes ``list`` to display interactive session status.

Version 0.7.2 (UNRELEASED)
Version 0.7.2 (2021-01-15)
--------------------------

- Adds support for Python 3.9.
- Fixes exception handling when uploading files.
- Fixes minor code warnings.
- Fixes traling slash issue from user exported REANA_SERVER_URL.

Version 0.7.1 (2020-11-10)
--------------------------
Expand Down
3 changes: 2 additions & 1 deletion reana_client/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from urllib3 import disable_warnings

from reana_client.cli import workflow, files, ping, secrets, quotas
from reana_client.utils import get_api_url

DEBUG_LOG_FORMAT = (
"[%(asctime)s] p%(process)s "
Expand All @@ -29,7 +30,7 @@ class Config(object):

def __init__(self):
"""Initialize config variables."""
self.reana_server_url = os.getenv("REANA_SERVER_URL", None)
self.reana_server_url = get_api_url()


class ReanaCLI(click.Group):
Expand Down
3 changes: 2 additions & 1 deletion reana_client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ def parse_secret_from_path(path):

def get_api_url():
"""Obtain REANA server API URL."""
return os.environ.get("REANA_SERVER_URL")
server_url = os.getenv("REANA_SERVER_URL", None)
return server_url.strip(" \t\n\r/") if server_url else None


def get_reana_yaml_file_path():
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

tests_require = [
"pytest-reana>=0.8.0a3,<0.9.0",
'google-auth==1.24.0 ; python_version=="2.7"',
]

extras_require = {
Expand Down

0 comments on commit 03460b7

Please sign in to comment.