Skip to content

Commit 77d6ac1

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 21aeab8 + 3b506ea commit 77d6ac1

File tree

173 files changed

+4409
-1320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+4409
-1320
lines changed

.env-devel

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# NOTE: write here host gid and docker gid.
2+
# TODO: keep hierarchy
23
HOST_GID=1000
34
DOCKER_GID=1001
45
RUN_DOCKER_ENGINE_ROOT=0
@@ -18,4 +19,5 @@ S3_ENDPOINT=minio:9000
1819
S3_ACCESS_KEY=12345678
1920
S3_SECRET_KEY=12345678
2021
S3_BUCKET_NAME=simcore
21-
22+
SMTP_HOST=smtp.gmail.com
23+
SMTP_PORT=465

.github/CODEOWNERS

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Order is important. The last matching pattern has the most precedence.
22

33
# files and folders recursively
4-
/docs/ @pcrespov
5-
/services/computation @mguidon
6-
/services/dy* @sanderegg
7-
/services/sidecar @pcrespov, @mguidon
8-
/services/web/client @odeimaiz, @oetiker
9-
/services/web/server @pcrespov
10-
/services/storage @mguidon
4+
/api/ @sanderegg, @pcrespov
5+
/docs/ @pcrespov
6+
/packages/service-library @pcrespov
7+
/services/computation @mguidon
8+
/services/dy* @sanderegg
9+
/services/sidecar @pcrespov, @mguidon
10+
/services/web/client @odeimaiz, @oetiker
11+
/services/web/server @pcrespov
12+
/services/storage @mguidon
1113

1214
# any change in travis
1315
/.travis.yml @odeimaiz

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- **WIP-** prefix in title if still work in progress -->
2+
13
## What do these changes do?
24

35
<!-- Please give a short brief about these changes. -->
@@ -6,9 +8,8 @@
68
## Related issue number
79

810
<!--
9-
- Add **WIP-** prefix in title if it is still work in progress (i.e. should not be merged but is ready to start reviewing it)
11+
Use [waffle.io] keywords in title/descriptions to trigger bot actions:
1012
11-
- Use [waffle.io] keywords in title/descriptions to trigger bot actions:
1213
- close, closes, close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved #[issueNumber]
1314
- connect to, connects to, connected to, connect, connects, connected #[issueNumber]
1415
-->
@@ -19,6 +20,7 @@
1920
- [ ] I think the code is well written
2021
- [ ] Unit tests for the changes exist
2122
- [ ] Documentation reflects the changes
23+
- [ ] **Runs in the swarm**
2224
- [ ] If you design a new module, add your user to .github/CODEOWNERS
2325

2426
[waffle.io]:https://waffle.io/marketing-assets/documents/waffleio_cheatsheet_v1.pdf?utm_source=blog&utm_medium=cheatsheet-ctabutton&utm_campaign=cheatsheet

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ matrix:
4646
- pip3 install packages/director-sdk/python
4747
- pushd services/web/server; pip3 install -r requirements/ci.txt; popd
4848
- pushd services/storage; pip3 install -r requirements/dev.txt; popd
49-
- pip3 install -r apis/tests/requirements.txt
49+
- pip3 install -r api/tests/requirements.txt
5050
- pip3 install -r services/apihub/tests/requirements.txt
5151

5252
before_script:

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,13 @@ before_test:
9696
${DOCKER_COMPOSE} -f packages/simcore-sdk/tests/docker-compose.yml build
9797

9898
run_test:
99-
pytest -v apis/tests
99+
pytest -v api/tests
100100
pytest -v services/apihub/tests
101101
pytest --cov=pytest_docker -v packages/pytest_docker/tests
102102
pytest --cov=s3wrapper -v packages/s3wrapper/tests
103103
pytest --cov=simcore_sdk -v packages/simcore-sdk/tests
104-
pytest --cov=simcore_service_webserver -v services/web/server/tests
104+
pytest --cov=simcore_service_webserver -v services/web/server/tests/unit
105+
pytest --cov=simcore_service_webserver -v services/web/server/tests/login
105106
pytest --cov=simcore_service_director -v services/director/tests
106107
pytest --cov=simcore_service_storage -v -m "not travis" services/storage/tests
107108

@@ -116,7 +117,7 @@ test:
116117
make run_test
117118
make after_test
118119

119-
PLATFORM_VERSION=3.13
120+
PLATFORM_VERSION=3.18
120121

121122
push_platform_images:
122123
${DOCKER} login masu.speag.com

apis/README.md renamed to api/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ The oSparc platform uses the following standards:
1515
## Folder structure
1616

1717
```bash
18-
/apis/ # base folder
19-
/apis/director/ # service name folder (e.g. for director service)
20-
/apis/director/v0/ # service version (v0 for development, then v1, v2... only major)
21-
/apis/director/v0/openapi.yaml # openapi specifications in YAML
22-
/apis/director/v0/schemas/ # schemas only used by the director API
23-
/apis/director/v0/schemas/services.yaml # openapi encoded service only schema
24-
25-
/apis/shared/ # shared apis/schemas base folder
26-
/apis/shared/schemas/ # sub folder for schemas
27-
/apis/shared/schemas/health_check.yaml # openapi encoded shared schema
28-
/apis/shared/schemas/node-meta.json # jsonschema encoded shared schema
29-
/apis/shared/schemas/v1/error.yaml # openapi encoded shaared schema for version 1
30-
/apis/shared/schemas/v2/error.yaml # openapi encoded shaared schema for version 2
18+
/api/specs/ # base folder
19+
/api/specs/director/ # service name folder (e.g. for director service)
20+
/api/specs/director/v0/ # service version (v0 for development, then v1, v2... only major)
21+
/api/specs/director/v0/openapi.yaml # openapi specifications in YAML
22+
/api/specs/director/v0/schemas/ # schemas only used by the director API
23+
/api/specs/director/v0/schemas/services.yaml # openapi encoded service only schema
24+
25+
/api/specs/shared/ # shared api/specs/schemas base folder
26+
/api/specs/shared/schemas/ # sub folder for schemas
27+
/api/specs/shared/schemas/health_check.yaml # openapi encoded shared schema
28+
/api/specs/shared/schemas/node-meta.json # jsonschema encoded shared schema
29+
/api/specs/shared/schemas/v1/error.yaml # openapi encoded shaared schema for version 1
30+
/api/specs/shared/schemas/v2/error.yaml # openapi encoded shaared schema for version 2
3131

3232
/tests/ # python tests folder to check schemas validity
3333
/tests/requirements.txt # requirements for python tests
File renamed without changes.
File renamed without changes.

apis/shared/schemas/node-output-list-api-v0.0.1.yaml renamed to api/specs/shared/schemas/node-output-list-api-v0.0.1.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
$schema: http://json-schema.org/draft-07/schema#
2-
$id: https://simcore.io/apis/shared/schemas/node-output-list-api-v0.0.1.yaml
2+
$id: https://simcore.io/api/specs/shared/schemas/node-output-list-api-v0.0.1.yaml
33

44
title: node output list api
55
description: nodes using the list representation for the output
66
must be able to handle the following requests
77
type: object
8-
required:
8+
required:
99
# the validator does not appreciate when required is missing here... and
1010
# sadly does not throw any meaningful error about it... so for now I put this...
1111
- getItemList
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
ErrorEnveloped:
2+
# - notice that data is defaulted to null
3+
#
4+
type: object
5+
required:
6+
- data
7+
- error
8+
properties:
9+
data:
10+
nullable: true
11+
default: null
12+
error:
13+
$ref: "#/ErrorType"
14+
15+
16+
17+
ErrorType:
18+
# - Normally transmitted as a response from server to client
19+
# - can exchage log messages between server and client. Possible applications:
20+
# - e.g. client side can render a widget to display messages logged to 'user'
21+
# - contains meta-information to allow client programatically understand the error. Possible applications:
22+
# - e.g. metadata can serialize an exception in server that can be reproduced in client side
23+
#
24+
type: object
25+
properties:
26+
logs:
27+
description: log messages
28+
type: array
29+
items:
30+
$ref: './log_message.yaml#/LogMessageType'
31+
errors:
32+
description: errors metadata
33+
type: array
34+
items:
35+
$ref: '#/ErrorItemType'
36+
status:
37+
description: HTTP error code
38+
type: integer
39+
example:
40+
BadRequestError:
41+
logs:
42+
- message: 'Requested information is incomplete or malformed'
43+
level: ERROR
44+
- message: 'Invalid email and password'
45+
level: ERROR
46+
logger: USER
47+
errors:
48+
- code: "InvalidEmail"
49+
message: "Email is malformed"
50+
field: email
51+
- code: "UnsavePassword"
52+
message: "Password is not secure"
53+
field: pasword
54+
status: 400
55+
56+
57+
ErrorItemType:
58+
type: object
59+
required:
60+
- code
61+
- message
62+
properties:
63+
code:
64+
type: string
65+
description: Typically the name of the exception that produced it otherwise some known error code
66+
message:
67+
type: string
68+
description: Error message specific to this item
69+
resource:
70+
type: string
71+
description: API resource affected by this error
72+
field:
73+
type: string
74+
description: Specific field within the resource
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FakeEnveloped:
2+
type: object
3+
required:
4+
- data
5+
- error
6+
properties:
7+
data:
8+
$ref: '#/FakeType'
9+
nullable: true
10+
default: null
11+
error:
12+
$ref: "./error.yaml#/ErrorType"
13+
nullable: true
14+
default: null
15+
16+
FakeType:
17+
type: object
18+
required:
19+
- path_value
20+
- query_value
21+
- body_value
22+
properties:
23+
path_value:
24+
type: string
25+
query_value:
26+
type: string
27+
body_value:
28+
type: object
29+
additionalProperties:
30+
type: string
31+
example:
32+
path_value: foo
33+
query_value: bar
34+
body_value:
35+
key1: value1
36+
key2: value2
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
HealthCheckEnveloped:
2+
type: object
3+
required:
4+
- data
5+
- error
6+
properties:
7+
data:
8+
$ref: '#/HealthCheckType'
9+
nullable: true
10+
default: null
11+
error:
12+
$ref: "./error.yaml#/ErrorType"
13+
nullable: true
14+
default: null
15+
16+
17+
HealthCheckType:
18+
type: object
19+
properties:
20+
name:
21+
type: string
22+
status:
23+
type: string
24+
api_version:
25+
type: string
26+
version:
27+
type: string
28+
example:
29+
name: 'simcore-director-service'
30+
status: SERVICE_RUNNING
31+
api_version: 0.1.0-dev+NJuzzD9S
32+
version: 0.1.0-dev+N127Mfv9H
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
LogMessageEnveloped:
2+
type: object
3+
required:
4+
- data
5+
- error
6+
properties:
7+
data:
8+
$ref: "#/LogMessageType"
9+
nullable: true
10+
default: null
11+
error:
12+
$ref: "./error.yaml#/ErrorType"
13+
nullable: true
14+
default: null
15+
16+
17+
LogMessageType:
18+
# - logger can be use as a way for the client to filter messages.
19+
# - E.g. logger naming can be hierarchical, and all including "*.user.*"
20+
# are displayed as a flash message in the front-end
21+
#
22+
type: object
23+
properties:
24+
level:
25+
description: log level
26+
type: string
27+
default: INFO
28+
enum:
29+
- DEBUG
30+
- WARNING
31+
- INFO
32+
- ERROR
33+
message:
34+
description: log message. If logger is USER, then it MUST be human readable
35+
type: string
36+
logger:
37+
description: name of the logger receiving this message
38+
type: string
39+
required:
40+
- message
41+
example:
42+
message: 'Hi there, Mr user'
43+
level: INFO
44+
logger: user-logger
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
LoginEnveloped:
2+
type: object
3+
required:
4+
- data
5+
- error
6+
properties:
7+
data:
8+
$ref: '#/LoginFormType'
9+
nullable: true
10+
default: null
11+
error:
12+
$ref: "./error.yaml#/ErrorType"
13+
nullable: true
14+
default: null
15+
16+
17+
LoginFormType:
18+
type: object
19+
properties:
20+
email:
21+
type: string
22+
#FIXME: format: email
23+
password:
24+
type: string
25+
#FIXME: format: password
26+
example:
27+
28+
password: 'my secret'
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
RegistrationEnveloped:
2+
type: object
3+
required:
4+
- data
5+
- error
6+
properties:
7+
data:
8+
$ref: '#/RegistrationType'
9+
nullable: true
10+
default: null
11+
error:
12+
$ref: "./error.yaml#/ErrorType"
13+
nullable: true
14+
default: null
15+
16+
17+
RegistrationType:
18+
type: object
19+
properties:
20+
email:
21+
type: string
22+
#FIXME: 'error': {'logs': [], 'errors': [{'code': 'OpenAPISchemaError', 'message': 'Unsupported email format unmarshalling', 'resource': None, 'field': None}], 'status': 400}}
23+
#format: email
24+
password:
25+
type: string
26+
# TODO: File "/home/crespo/devp/osparc-simcore/.venv/lib/python3.6/site-packages/openapi_core/schema/schemas/models.py", line 182, in _unmarshal_string
27+
# formatter = self.STRING_FORMAT_CAST_CALLABLE_GETTER[schema_format]
28+
# KeyError: <SchemaFormat.PASSWORD: 'password'>
29+
#format: password
30+
confirm:
31+
type: string
32+
#format: password
33+
example:
34+
35+
password: 'my secret'
36+
confim: 'my secret'

0 commit comments

Comments
 (0)