From 7bb1b5213f6642957aebb31669685354f48f6717 Mon Sep 17 00:00:00 2001 From: Stefan Negru Date: Tue, 7 Apr 2020 14:11:55 +0300 Subject: [PATCH 1/4] small fixes --- beacon_api/utils/validate.py | 4 +--- deploy/test/mock_auth.py | 7 +++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/beacon_api/utils/validate.py b/beacon_api/utils/validate.py index 2bf37de4..e40817fc 100644 --- a/beacon_api/utils/validate.py +++ b/beacon_api/utils/validate.py @@ -3,7 +3,6 @@ from aiohttp import web from authlib.jose import jwt from authlib.jose.errors import MissingClaimError, InvalidClaimError, ExpiredTokenError, InvalidTokenError -import json import re import aiohttp import os @@ -33,9 +32,8 @@ async def parse_request_object(request): items = {k: (int(v) if k in int_params else v) for k, v in request.rel_url.query.items()} if 'datasetIds' in items: items['datasetIds'] = request.rel_url.query.get('datasetIds').split(',') - obj = json.dumps(items) LOG.info('Parsed GET request parameters.') - return request.method, json.loads(obj) + return request.method, items # TO DO if required do not set default diff --git a/deploy/test/mock_auth.py b/deploy/test/mock_auth.py index b5143d28..6bbe9e3f 100644 --- a/deploy/test/mock_auth.py +++ b/deploy/test/mock_auth.py @@ -118,8 +118,11 @@ def generate_token(): async def jwk_response(request): """Mock JSON Web Key server.""" - data = [DATA[0]] - data[0]['kid'] = 'rsa1' + keys = [DATA[0]] + keys[0]['kid'] = 'rsa1' + data = { + "keys": keys + } return web.json_response(data) From 9ee2223cd0aaddf05bf4bbe123f8b580a1610845 Mon Sep 17 00:00:00 2001 From: Stefan Negru Date: Tue, 7 Apr 2020 14:14:35 +0300 Subject: [PATCH 2/4] bump version --- beacon_api/conf/config.ini | 2 +- deploy/test/auth_test.ini | 2 +- docs/example.rst | 2 +- tests/test.ini | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/beacon_api/conf/config.ini b/beacon_api/conf/config.ini index 4bba2689..2d97e0d6 100644 --- a/beacon_api/conf/config.ini +++ b/beacon_api/conf/config.ini @@ -7,7 +7,7 @@ title=GA4GHBeacon at CSC # Version of the Beacon implementation -version=1.6.0 +version=1.6.1 # Author of this software author=CSC developers diff --git a/deploy/test/auth_test.ini b/deploy/test/auth_test.ini index d385b9bd..1cf90aaf 100644 --- a/deploy/test/auth_test.ini +++ b/deploy/test/auth_test.ini @@ -7,7 +7,7 @@ title=GA4GHBeacon at CSC # Version of the Beacon implementation -version=1.6.0 +version=1.6.1 # Author of this software author=CSC developers diff --git a/docs/example.rst b/docs/example.rst index ed3b56e5..daba8566 100644 --- a/docs/example.rst +++ b/docs/example.rst @@ -126,7 +126,7 @@ Example Response: "createdAt": "2019-09-04T12:00:00Z", "updatedAt": "2019-09-05T05:55:18Z", "environment": "prod", - "version": "1.6.0" + "version": "1.6.1" } Query Endpoint diff --git a/tests/test.ini b/tests/test.ini index de018aaf..c88ffc9a 100644 --- a/tests/test.ini +++ b/tests/test.ini @@ -7,7 +7,7 @@ title=GA4GHBeacon at CSC # Version of the Beacon implementation -version=1.6.0 +version=1.6.1 # Author of this software author=CSC developers From c8e8a55d155be83f59220ad3d464ddc8c074f9fd Mon Sep 17 00:00:00 2001 From: Stefan Negru Date: Tue, 7 Apr 2020 14:29:37 +0300 Subject: [PATCH 3/4] fix docs --- docs/permissions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/permissions.rst b/docs/permissions.rst index 079d4b01..c4079126 100644 --- a/docs/permissions.rst +++ b/docs/permissions.rst @@ -65,7 +65,7 @@ The permissions are then passed in :meth:`beacon_api.utils.validate` as illustra .. literalinclude:: /../beacon_api/utils/validate.py :language: python :dedent: 16 - :lines: 183-200 + :lines: 180-197 If there is no claim for GA4GH permissions as illustrated above, they will not be added to ``controlled_datasets``. From 80b655cc02daa313c8a7b43644cdb98019f4f467 Mon Sep 17 00:00:00 2001 From: "teemu.kataja" Date: Tue, 7 Apr 2020 14:36:42 +0300 Subject: [PATCH 4/4] fix sphinx deprecation --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index c7c92760..6fc6b94a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -134,7 +134,7 @@ def __getattr__(cls, name): def setup(app): """Add custom stylesheet.""" - app.add_stylesheet('custom.css') + app.add_css_file('custom.css') # -- Other stuff ----------------------------------------------------------