From bb82b9539089e03854d1c9b2a977c845e33c9cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Mero=C3=B1o-Pe=C3=B1uela?= Date: Sat, 9 May 2020 13:34:42 +0200 Subject: [PATCH 1/5] Security patch waitress --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ceba79f..bc7b860 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,4 +22,4 @@ SPARQLWrapper==1.8.2 werkzeug>=0.16.0 PyGithub==1.43.5 gunicorn==19.6.0; sys_platform!="win32" -waitress==1.4.0; sys_platform=="win32" +waitress>=1.4.2; sys_platform=="win32" From 61207c91355347405c44b3823ce243dbb3a818c4 Mon Sep 17 00:00:00 2001 From: Carlos Martinez Date: Sat, 16 May 2020 09:18:59 +0200 Subject: [PATCH 2/5] Remove Access-Control-Allow-Origin nginx header Fixes #265 --- docker-assets/assets/runtime/configs/nginx/grlc | 3 --- 1 file changed, 3 deletions(-) diff --git a/docker-assets/assets/runtime/configs/nginx/grlc b/docker-assets/assets/runtime/configs/nginx/grlc index c27c5b2..d115bd5 100644 --- a/docker-assets/assets/runtime/configs/nginx/grlc +++ b/docker-assets/assets/runtime/configs/nginx/grlc @@ -51,9 +51,6 @@ server { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto {{NGINX_X_FORWARDED_PROTO}}; - - add_header Access-Control-Allow-Origin *; - } } From c792f6d8380f5149e381b6d347cceded213c8b54 Mon Sep 17 00:00:00 2001 From: Carlos Martinez Date: Sat, 16 May 2020 09:45:50 +0200 Subject: [PATCH 3/5] Fix Markdown links --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6097110..5404594 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ Syntax: #+ summary: This is the summary of my query/operation ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/summary.rq) and the equivalent (API operation)[http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_summary]. +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/summary.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_summary). ### `description` Creates a description of your query/operation. This is shown as the description of your operation in the swagger-ui. @@ -117,7 +117,7 @@ Syntax: #+ description: Extended description of my query/operation. ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/description.rq) and the equivalent (API operation)[http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_description]. +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/description.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_description). ### `endpoint` Specifies a query-specific endpoint. @@ -127,7 +127,7 @@ Syntax: #+ endpoint: http://example.com/sparql ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/endpoint.rq) and the equivalent (API operation)[http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_endpoint]. +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/endpoint.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_endpoint). ### `pagination` Paginates the results in groups of (for example) 100. Links to previous, next, first, and last result pages are provided as HTTP response headers to avoid polluting the payload (see details [here](https://developer.github.com/v3/guides/traversing-with-pagination/)) @@ -137,7 +137,7 @@ Syntax: #+ pagination: 100 ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/pagination.rq) and the equivalent (API operation)[http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_pagination]. +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/pagination.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_pagination). ### `method` Indicates the HTTP request method (`GET` and `POST` are supported). @@ -147,7 +147,7 @@ Syntax: #+ method: GET ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/method.rq) and the equivalent (API operation)[http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/post_method]. +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/method.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/post_method). ### `tags` Assign tags to your query/operation. Query/operations with the same tag are grouped together in the swagger-ui. @@ -159,7 +159,7 @@ Syntax: #+ - secondTag ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/tags.rq) and the equivalent (API operation)[http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/group1/get_tags]. +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/tags.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/group1/get_tags). ### `enumerate` Indicates which parameters of your query/operation should get enumerations (and get dropdown menus in the swagger-ui) using the given values from the SPARQL endpoint. The values for each enumeration variable can also be specified into the query decorators to save endpoint requests and speed up the API generation. @@ -172,7 +172,7 @@ Syntax: #+ - value2 ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/enumerate.rq) and the equivalent (API operation)[http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_enumerate]. +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/enumerate.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_enumerate). Notice that these should be plain variable names without SPARQL/BASIL conventions (so `var1` instead of `?_var1_iri`) @@ -184,7 +184,7 @@ Syntax: #+ endpoint_in_url: False ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/endpoint_url.rq) and the equivalent (API operation)[http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_endpoint_url]. +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/endpoint_url.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_endpoint_url). ### `transform` Allows query results to be converted to the specified JSON structure, by using [SPARQLTransformer](https://github.com/D2KLab/py-sparql-transformer) syntax. @@ -198,7 +198,7 @@ Syntax: #+ } ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/transform.rq) and the equivalent (API operation)[http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_transform]. +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/transform.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_transform). ### Example APIs From f5de05d31ce81706ccddc9a87776b011926a36ca Mon Sep 17 00:00:00 2001 From: Carlos Martinez Date: Sat, 16 May 2020 09:48:05 +0200 Subject: [PATCH 4/5] Point example links to grlc.io --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5404594..101b786 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ Syntax: #+ summary: This is the summary of my query/operation ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/summary.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_summary). +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/summary.rq) and the equivalent [API operation](http://grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_summary). ### `description` Creates a description of your query/operation. This is shown as the description of your operation in the swagger-ui. @@ -117,7 +117,7 @@ Syntax: #+ description: Extended description of my query/operation. ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/description.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_description). +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/description.rq) and the equivalent [API operation](http://grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_description). ### `endpoint` Specifies a query-specific endpoint. @@ -127,7 +127,7 @@ Syntax: #+ endpoint: http://example.com/sparql ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/endpoint.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_endpoint). +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/endpoint.rq) and the equivalent [API operation](http://grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_endpoint). ### `pagination` Paginates the results in groups of (for example) 100. Links to previous, next, first, and last result pages are provided as HTTP response headers to avoid polluting the payload (see details [here](https://developer.github.com/v3/guides/traversing-with-pagination/)) @@ -137,7 +137,7 @@ Syntax: #+ pagination: 100 ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/pagination.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_pagination). +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/pagination.rq) and the equivalent [API operation](http://grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_pagination). ### `method` Indicates the HTTP request method (`GET` and `POST` are supported). @@ -147,7 +147,7 @@ Syntax: #+ method: GET ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/method.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/post_method). +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/method.rq) and the equivalent [API operation](http://grlc.io/api-git/CLARIAH/grlc-queries/#/default/post_method). ### `tags` Assign tags to your query/operation. Query/operations with the same tag are grouped together in the swagger-ui. @@ -159,7 +159,7 @@ Syntax: #+ - secondTag ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/tags.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/group1/get_tags). +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/tags.rq) and the equivalent [API operation](http://grlc.io/api-git/CLARIAH/grlc-queries/#/group1/get_tags). ### `enumerate` Indicates which parameters of your query/operation should get enumerations (and get dropdown menus in the swagger-ui) using the given values from the SPARQL endpoint. The values for each enumeration variable can also be specified into the query decorators to save endpoint requests and speed up the API generation. @@ -172,7 +172,7 @@ Syntax: #+ - value2 ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/enumerate.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_enumerate). +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/enumerate.rq) and the equivalent [API operation](http://grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_enumerate). Notice that these should be plain variable names without SPARQL/BASIL conventions (so `var1` instead of `?_var1_iri`) @@ -184,7 +184,7 @@ Syntax: #+ endpoint_in_url: False ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/endpoint_url.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_endpoint_url). +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/endpoint_url.rq) and the equivalent [API operation](http://grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_endpoint_url). ### `transform` Allows query results to be converted to the specified JSON structure, by using [SPARQLTransformer](https://github.com/D2KLab/py-sparql-transformer) syntax. @@ -198,7 +198,7 @@ Syntax: #+ } ``` -Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/transform.rq) and the equivalent [API operation](http://dev.grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_transform). +Example [query](https://github.com/CLARIAH/grlc-queries/blob/master/transform.rq) and the equivalent [API operation](http://grlc.io/api-git/CLARIAH/grlc-queries/#/default/get_transform). ### Example APIs From 6d824b8f5b04f0f62ccc7bcca3ae0bb4c504b6ba Mon Sep 17 00:00:00 2001 From: Carlos Martinez Date: Tue, 19 May 2020 21:43:09 +0200 Subject: [PATCH 5/5] Prepare release 1.3.4 --- CITATION.cff | 2 +- setup.py | 2 +- src/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 9672fd8..5938fff 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -25,4 +25,4 @@ license: MIT message: "If you use this software, please cite it as below." repository-code: "https://github.com/CLARIAH/grlc" title: grlc -version: "1.3.3" +version: "1.3.4" diff --git a/setup.py b/setup.py index c198971..0c98e46 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ root_dir = root.replace(grlc_base_dir, '') data_files = os.path.join(root_dir, '*') grlc_data.append(data_files) -grlc_version = '1.3.3' +grlc_version = '1.3.4' with codecs.open('requirements.txt', mode='r') as f: install_requires = f.read().splitlines() diff --git a/src/__init__.py b/src/__init__.py index 07f744c..ac422f1 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1 +1 @@ -__version__ = '1.3.3' +__version__ = '1.3.4'