Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit 89de6dc

Browse files
authored
Merge pull request #141 from CSCfi/dev
Release 1.6.0
2 parents 2b60c43 + 308a438 commit 89de6dc

20 files changed

Lines changed: 154 additions & 38 deletions

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ jobs:
6161
name: "Integration Tests"
6262
python: 3.6
6363
before_script:
64-
- wget https://github.com/openshift/source-to-image/releases/download/v1.1.12/source-to-image-v1.1.12-2a783420-linux-amd64.tar.gz
65-
- tar -xvf source-to-image-v1.1.12-2a783420-linux-amd64.tar.gz
64+
- wget https://github.com/openshift/source-to-image/releases/download/v1.2.0/source-to-image-v1.2.0-2a579ecd-linux-amd64.tar.gz
65+
- tar -xvf source-to-image-v1.2.0-2a579ecd-linux-amd64.tar.gz
6666
- sudo cp s2i /usr/local/bin
6767
- s2i build . centos/python-36-centos7 cscfi/beacon-python
6868
- cd deploy/test

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Documentation: https://beacon-python.readthedocs.io
1111

1212
`beacon-python` Web Server requires:
1313
* Python 3.6+;
14-
* running DB [PostgreSQL Server](https://www.postgresql.org/) 9.6+.
14+
* running DB [PostgreSQL Server](https://www.postgresql.org/) 9.6+ (recommended 11.6).
1515

1616
```shell
1717
git clone https://github.com/CSCfi/beacon-python
@@ -30,7 +30,7 @@ docker run -e POSTGRES_USER=beacon \
3030
-e POSTGRES_PASSWORD=beacon \
3131
-v "$PWD/data":/docker-entrypoint-initdb.d
3232
-e POSTGRES_DB=beacondb \
33-
-p 5432:5432 postgres:9.6
33+
-p 5432:5432 postgres:11.6
3434
```
3535

3636
#### Run beacon-python

beacon_api/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,7 @@
3838
__sample_queries__ = SAMPLE_QUERIES
3939

4040
# GA4GH Discovery
41-
__service_type__ = f'{CONFIG_INFO.service_type}:{__apiVersion__}'
41+
__service_type__ = {'group': f'{CONFIG_INFO.service_group}',
42+
'artifact': f'{CONFIG_INFO.service_artifact}',
43+
'version': f'{__apiVersion__}'}
4244
__service_env__ = CONFIG_INFO.environment

beacon_api/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def set_cors(server):
9494
allow_credentials=True,
9595
expose_headers="*",
9696
allow_headers="*",
97+
allow_methods=["GET", "POST", "OPTIONS"],
98+
max_age=86400,
9799
)
98100
})
99101
# Apply CORS to endpoints

beacon_api/conf/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def parse_config_file(path):
3333
'url': config.get('beacon_api_info', 'url'),
3434
'alturl': config.get('beacon_api_info', 'alturl'),
3535
'createtime': config.get('beacon_api_info', 'createtime'),
36-
'service_type': config.get('beacon_api_info', 'service_type'),
36+
'service_group': config.get('beacon_api_info', 'service_group'),
37+
'service_artifact': config.get('beacon_api_info', 'service_artifact'),
3738
'environment': config.get('beacon_api_info', 'environment'),
3839
'org_id': config.get('organisation_info', 'org_id'),
3940
'org_name': config.get('organisation_info', 'org_name'),

beacon_api/conf/config.ini

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
title=GA4GHBeacon at CSC
88

99
# Version of the Beacon implementation
10-
version=1.5.0
10+
version=1.6.0
1111

1212
# Author of this software
1313
author=CSC developers
@@ -42,8 +42,9 @@ alturl=
4242
createtime=2018-07-25T00:00:00Z
4343

4444
# GA4GH Discovery type `groupId` and `artifactId`, joined in /service-info with apiVersion
45-
# See https://github.com/ga4gh-discovery/ga4gh-service-registry for more information and possible values
46-
service_type=org.ga4gh:beacon
45+
# See https://github.com/ga4gh-discovery/ga4gh-service-info for more information and possible values
46+
service_group=org.ga4gh
47+
service_artifact=beacon
4748

4849
# GA4GH Discovery server environment, possible values: prod, dev, test
4950
environment=prod
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"definitions": {},
3+
"type": "object",
4+
"additionalProperties": false,
5+
"required": [
6+
"id",
7+
"name",
8+
"type",
9+
"description",
10+
"organization",
11+
"version"
12+
],
13+
"properties": {
14+
"id": {
15+
"type": "string",
16+
"pattern": "^(.*)$"
17+
},
18+
"name": {
19+
"type": "string",
20+
"pattern": "^(.*)$"
21+
},
22+
"type": {
23+
"type": "object",
24+
"required": [
25+
"group",
26+
"artifact",
27+
"version"
28+
],
29+
"properties": {
30+
"group": {
31+
"type": "string",
32+
"pattern": "^(.*)$"
33+
},
34+
"artifact": {
35+
"type": "string",
36+
"pattern": "^(.*)$"
37+
},
38+
"version": {
39+
"type": "string",
40+
"pattern": "^(.*)$"
41+
}
42+
}
43+
},
44+
"description": {
45+
"type": "string",
46+
"pattern": "^(.*)$"
47+
},
48+
"organization": {
49+
"type": "object",
50+
"required": [
51+
"name",
52+
"url"
53+
],
54+
"properties": {
55+
"name": {
56+
"type": "string",
57+
"pattern": "^(.*)$"
58+
},
59+
"url": {
60+
"type": "string",
61+
"pattern": "^(.*)$"
62+
}
63+
}
64+
},
65+
"contactUrl": {
66+
"type": "string",
67+
"pattern": "^(.*)$"
68+
},
69+
"documentationUrl": {
70+
"type": "string",
71+
"pattern": "^(.*)$"
72+
},
73+
"createdAt": {
74+
"type": "string",
75+
"pattern": "^(.*)$"
76+
},
77+
"updatedAt": {
78+
"type": "string",
79+
"pattern": "^(.*)$"
80+
},
81+
"environment": {
82+
"type": "string",
83+
"pattern": "^(.*)$"
84+
},
85+
"version": {
86+
"type": "string",
87+
"pattern": "^(.*)$"
88+
}
89+
}
90+
}
91+

deploy/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '3.2'
33
services:
44
postgres:
55
hostname: postgres
6-
image: postgres:11.2
6+
image: postgres:11.6
77
environment:
88
POSTGRES_USER: beacon
99
POSTGRES_DB: beacondb

deploy/test/auth_test.ini

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
title=GA4GHBeacon at CSC
88

99
# Version of the Beacon implementation
10-
version=1.5.0
10+
version=1.6.0
1111

1212
# Author of this software
1313
author=CSC developers
@@ -41,8 +41,9 @@ alturl=https://ega-archive.org/
4141
createtime=2018-07-25T00:00:00Z
4242

4343
# GA4GH Discovery type `groupId` and `artifactId`, joined in /service-info with apiVersion
44-
# See https://github.com/ga4gh-discovery/ga4gh-service-registry for more information and possible values
45-
service_type=org.ga4gh:beacon
44+
# See https://github.com/ga4gh-discovery/ga4gh-service-info for more information and possible values
45+
service_group=org.ga4gh
46+
service_artifact=beacon
4647

4748
# GA4GH Discovery server environment, possible values: prod, dev, test
4849
environment=prod

deploy/test/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '3.2'
33
services:
44
postgres:
55
hostname: postgres
6-
image: postgres:11.2
6+
image: postgres:11.6
77
environment:
88
POSTGRES_USER: beacon
99
POSTGRES_DB: beacondb

0 commit comments

Comments
 (0)