Skip to content

New GUI for editing projects #255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 721 commits into from
Oct 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
721 commits
Select commit Hold shift + click to select a range
c304bbc
set dynamic services back in
sanderegg Sep 26, 2018
f858855
fix container under linux
sanderegg Sep 26, 2018
c3c23cf
check if part of swarm
sanderegg Sep 26, 2018
e109fee
revert last change
sanderegg Sep 26, 2018
47c9653
try updating docker in travis
sanderegg Sep 27, 2018
ef0d162
switch conversion back on as node description are again going to chan…
sanderegg Sep 27, 2018
b24ac18
fix test with conversion back on
sanderegg Sep 27, 2018
314036a
More refactoring
Sep 28, 2018
6747827
minor
Sep 28, 2018
7fc94d7
minor
Oct 1, 2018
3e77996
minor
Oct 1, 2018
f6a5f55
Working after refactoring. Needs to be cleaned.
Oct 1, 2018
984420c
minor
Oct 1, 2018
c1c89ee
createNode uniformed
Oct 1, 2018
dcecac7
Distinguish between remove and clear nodes/links
Oct 1, 2018
dfcbb88
"of Object.keys()" -> "in"
Oct 1, 2018
1ee019b
ups
Oct 1, 2018
6332897
Show path on title
Oct 1, 2018
3402493
minor
Oct 1, 2018
325c9f6
Data extended
Oct 1, 2018
19efae3
refactoring going on
Oct 2, 2018
cb3aff3
Cleaning code
Oct 2, 2018
aa83f26
Cleaning code
Oct 2, 2018
62406fe
More cleaning
Oct 2, 2018
1d76a60
removed input/outpurPortId from linkBase
Oct 2, 2018
0388ce7
More refactoring
Oct 2, 2018
a53d625
Refactoring finished
Oct 2, 2018
c4d36a0
minor
Oct 2, 2018
d0fb73e
minor
Oct 2, 2018
a523763
Cleaning code
Oct 2, 2018
cb937ed
stop starting dynamic codes upon creation
Oct 2, 2018
d9ccfa2
distinguish same level node links and different node links
Oct 2, 2018
a814325
Fixed collapsed LF Sim Data
Oct 2, 2018
d8a6506
flush Layout when adding nodes
Oct 2, 2018
3d75ed6
minor fix
Oct 2, 2018
cefe8e5
minor
Oct 2, 2018
7663f85
Inputs box added
Oct 2, 2018
57c65ae
minor fix
Oct 2, 2018
e400c45
set Name in NodeModel
Oct 2, 2018
7a00bdd
Showing input nodes for the macro-view
Oct 2, 2018
28029af
Make travis happy
Oct 2, 2018
ebf65e4
renaming
Oct 3, 2018
2455978
renaming
Oct 3, 2018
1b9e5cd
cleaning
Oct 3, 2018
ce90382
No more portId
Oct 3, 2018
1fb7424
refactoring
Oct 3, 2018
58b9bfa
refactoring
Oct 3, 2018
05c98bd
renaming
Oct 3, 2018
b94fc5a
renaming
Oct 3, 2018
b388f04
Mini versions not needed anymore
Oct 3, 2018
f0138fb
SettingsView moved to widgets
Oct 3, 2018
856971c
Making sure node is rendered before trying to get its bounds
Oct 3, 2018
684ce7e
more refactoring
Oct 3, 2018
36e94c0
Node Input has its own class
Oct 3, 2018
44d9171
cleaning
Oct 3, 2018
6164092
Links into containers working!
Oct 3, 2018
e2ae5df
some safety checks added
Oct 3, 2018
4906bda
Fake Data modified
Oct 3, 2018
32ce15d
reusing code
Oct 3, 2018
729da5e
reusing code
Oct 3, 2018
ae42bb3
Cleaning
Oct 3, 2018
5e259b4
renaming
Oct 3, 2018
7485f77
refactoring
Oct 3, 2018
f7e7b78
minor
Oct 3, 2018
53a8645
Nodes can be added in any level
Oct 3, 2018
65e0e76
minor
Oct 3, 2018
bc2db0a
minor
Oct 3, 2018
c6cfa61
InputNodes layout added to SettingsView
Oct 3, 2018
8ded340
translations added
Oct 3, 2018
1dc7206
SettingsView needs WorkbenchModel
Oct 4, 2018
b95cebd
Workbench -> WorkbenchView
Oct 4, 2018
f61efb3
NodeInput is a widget
Oct 4, 2018
ad2c8a2
minor
Oct 4, 2018
8cb0cb8
Show folder icon in settingsView
Oct 4, 2018
084d986
Show start and folder buttons in settings view
Oct 4, 2018
fdec675
Add Exposed nodes to WorkebenchView
Oct 4, 2018
09ad98c
SettingsView shows input nodes
Oct 4, 2018
6c4236a
Revert "Add Exposed nodes to WorkebenchView"
odeimaiz Oct 8, 2018
8bc0ad7
Show interactive service mechanism is back
odeimaiz Oct 8, 2018
d7c097d
minor
odeimaiz Oct 8, 2018
3dad256
LF sensor settings data extended
odeimaiz Oct 8, 2018
2b005e0
Collapsable VBox improved
odeimaiz Oct 8, 2018
c8f98d8
Show Node Ports with settings view
odeimaiz Oct 8, 2018
6b43007
added force flag
sanderegg Oct 9, 2018
488f42a
minor
Oct 9, 2018
7887dc8
minor fix
Oct 9, 2018
4ede44d
aesthetics
Oct 9, 2018
7cd5c25
minor
Oct 9, 2018
64f2497
FileManager -> FilePicker
Oct 9, 2018
50b1d38
File Manager -> File Picker
Oct 9, 2018
ea1c9be
File Manager added to node
Oct 9, 2018
e22627a
added tool for converting jsonschema files to openapi files
sanderegg Oct 9, 2018
115b3e7
enhance converter to save as yaml
sanderegg Oct 9, 2018
7d1a448
moved parameters and schemas to components subfolder
sanderegg Oct 9, 2018
43b704e
Working drag drop mechanism
Oct 10, 2018
ab0667a
minor
Oct 10, 2018
9edc88d
examples are not allowed in openAPI in schemas and properties. exampl…
sanderegg Oct 10, 2018
8c57611
director uses json to openapi converted file for services
sanderegg Oct 10, 2018
233c3bf
Merge branch 'master' into feature/#249_jsonschema2openapi_tool
sanderegg Oct 10, 2018
0b02f1f
reverted wrong change
sanderegg Oct 10, 2018
e76a734
reverted wrong change (typo)
sanderegg Oct 10, 2018
31d0dcc
use fct as_uri to get valid url
sanderegg Oct 10, 2018
54baa3a
FakeData follows new schemas
Oct 10, 2018
bb9dbd3
Frontend adapted to new schema
Oct 10, 2018
b70face
added tool docs
sanderegg Oct 10, 2018
8f81dd3
minor
Oct 10, 2018
e6704ae
"Show Workbench" button removed
Oct 10, 2018
c9e1d56
"Show Workbench" button removed (2)
Oct 10, 2018
c1354f4
TreeTool knows project name
Oct 10, 2018
d134a75
VirtualTree -> TreeVirtual
Oct 10, 2018
1609ea6
minor
Oct 10, 2018
7590fc0
getPath moved to WorkbenchModel
Oct 10, 2018
3d0f8ad
WorkbenchModel knows projectName
Oct 10, 2018
70d4ca8
minor
Oct 10, 2018
51380d4
minor
Oct 10, 2018
76902de
changed output filename following discussion with @pcrespo
sanderegg Oct 10, 2018
403da9e
some basic documentation on reusability of opeapi
sanderegg Oct 10, 2018
c9bcbf7
first draft of a shared folder structure
sanderegg Oct 10, 2018
f26c53c
first tests that check validity of any openapi spec in the folders
sanderegg Oct 10, 2018
4fb1fab
Node knows its parent's nodeId
Oct 11, 2018
659affd
cleaning
Oct 11, 2018
5b44ef0
getPath working
Oct 11, 2018
d0eb3e5
Split side panel in three equal spaces
Oct 11, 2018
c817efe
Show Logger on the bottom right
Oct 11, 2018
65f12cc
Remove project name from top right
Oct 11, 2018
f8981c2
removed generic response
sanderegg Oct 11, 2018
ff59d5d
renamed tests and separated in themesadded tests to validate separate…
sanderegg Oct 11, 2018
46e4af3
spaces
sanderegg Oct 11, 2018
b2a3995
Added getPathWithId
Oct 11, 2018
1dffb21
Merge branch 'master' into feature/#233_api_sharing
sanderegg Oct 11, 2018
2a883f4
enable testing on travis
sanderegg Oct 11, 2018
a853712
minor
Oct 11, 2018
5aace94
refactoring
Oct 11, 2018
d14c816
Show path with buttons in NavigationBar
Oct 11, 2018
a682c94
NodeModel.name ->NodeModel.label
Oct 11, 2018
6dda7cb
TreeTool logic improved
Oct 11, 2018
6bc97ed
Tree always in sync with selection
Oct 11, 2018
027ff2a
added automatic json schema validator
sanderegg Oct 11, 2018
899b112
Attempt to show nodeId, didn't make it :(
Oct 11, 2018
2a24664
SidePanel properly sized
Oct 11, 2018
14ce4c5
minor
Oct 11, 2018
c1b0c95
modified setup to follow cookiecutter
sanderegg Oct 11, 2018
20752b1
removed openapi from director folder
sanderegg Oct 11, 2018
d3631c8
aesthetics
Oct 11, 2018
9fffb22
minor
Oct 11, 2018
6ca10f7
drag&drop event type renamed
Oct 11, 2018
de8db76
drag&drop event type renamed (2)
Oct 11, 2018
42c24a5
arePortsCompatible signature extended
Oct 11, 2018
83ae72a
NodePorts can only be dragged
Oct 11, 2018
277d07f
Ports always are compatible
Oct 11, 2018
d66522f
Drag&Drop working between NodePorts and SettingsView
Oct 11, 2018
c644935
minor
Oct 12, 2018
4661517
minor
Oct 12, 2018
c563688
set to v0 as it is still dev
sanderegg Oct 12, 2018
a2fcbf2
minor
Oct 12, 2018
ccf8595
only keep schemas as separated entities
sanderegg Oct 12, 2018
f4707c5
refactored openapi to have only schemas as separate entities
sanderegg Oct 12, 2018
edb55de
fixed reference
sanderegg Oct 12, 2018
e5c378f
minor
Oct 12, 2018
3052abb
renamed folder back from api to oas3
sanderegg Oct 12, 2018
6561fb1
added version in codegenerator
sanderegg Oct 12, 2018
2c51a1c
updated code generator version
sanderegg Oct 12, 2018
37b5cdf
added validation tests for individual schemas
sanderegg Oct 12, 2018
fdecb06
fixing path
sanderegg Oct 12, 2018
f131d46
Show only exposed nodes in SettingsView (no containers)
Oct 12, 2018
0463a9e
OptionsBar commented out
Oct 12, 2018
2ef4bd3
Use Window.center() instead of hardcoded positions
Oct 12, 2018
797cc94
reverted to genreator 3.2.3
sanderegg Oct 12, 2018
8a124f8
fixed root get test as new openapi modifed the object type??
sanderegg Oct 12, 2018
15a9b0e
fixed nullability of response 204
sanderegg Oct 12, 2018
8410903
WorkebenchModel takes care of workbench serialization
Oct 12, 2018
edaeeb0
FilePicker has only one output port
Oct 12, 2018
8916cf6
force Visibility.flush when changing visibility
Oct 12, 2018
eb8d32f
WidgetManager only returns file-picker
Oct 12, 2018
2d7bca0
PrjEditor asks WidgetManager for dynamic services
Oct 12, 2018
4c97523
Workbench serialization following schema
Oct 12, 2018
9915722
Workbench serialization following schema (2)
Oct 12, 2018
bfff8ce
isPropertyInitialized :)
Oct 12, 2018
1975d94
Rerender form everytime data is set or changed (needed for linked props)
Oct 12, 2018
a72c9ef
added apihub service
sanderegg Oct 12, 2018
05e5961
now generating openapi from apihub files
sanderegg Oct 12, 2018
633052e
minor
Oct 12, 2018
6b1ced0
setSettingsData dicoupled
Oct 12, 2018
a52335a
minor
Oct 12, 2018
8b59e86
Merge remote-tracking branch 'upstream/master'
Oct 12, 2018
26e65c4
Merge branch 'master' into feature/sim-widget
Oct 12, 2018
8cef1d3
added tests for the apihub service
sanderegg Oct 12, 2018
387471e
pylint
sanderegg Oct 12, 2018
b848e2b
pylint is happy
sanderegg Oct 12, 2018
23ccb30
pyliint
sanderegg Oct 12, 2018
1d3712f
minor
Oct 15, 2018
2f46d77
NodeModel contructor signature changed. Refactoring
Oct 15, 2018
c939f9a
renaming
Oct 15, 2018
f5d49d0
minor
Oct 15, 2018
c8402e0
minor
Oct 15, 2018
a6af27c
minor
Oct 15, 2018
bb8678f
Create Port Link (Drag&Drop) and Remove Link (button) working
Oct 15, 2018
9f91ac4
minor
Oct 15, 2018
8a7502d
isLinked is not used
Oct 15, 2018
ead1efd
disable/enable form field according to link
Oct 15, 2018
40f25fa
minor
Oct 15, 2018
31d657b
File Picker writes output not metadata
Oct 15, 2018
b375f73
renaming
Oct 15, 2018
8cac872
small fix
Oct 15, 2018
d3c6db9
Write current output when serializing
Oct 15, 2018
6e21505
get/setOutputValues added
Oct 15, 2018
2e5c112
cleaning
Oct 15, 2018
81ce5cc
Cleaning the backend a bit
Oct 16, 2018
5c71ddf
minor
Oct 16, 2018
b2a4401
renaming
Oct 16, 2018
a890f30
added rationales
sanderegg Oct 16, 2018
4aa343c
setLabel from metadata and then override
Oct 16, 2018
911ad9f
added tests on api conventions
sanderegg Oct 16, 2018
97b81df
references fixed
Oct 16, 2018
f97dec8
Working get_services call
Oct 16, 2018
6d81ad7
Stop flushing Widgets
Oct 16, 2018
380521a
renamed componets -> componet and widgets -> widget
Oct 16, 2018
9fb4c6c
Add Custom TreeItem widget for node tree
oetiker Oct 16, 2018
174081c
added tool to compile oas from separated files
sanderegg Oct 16, 2018
bc3e5a7
rename things
oetiker Oct 16, 2018
5dd2a7e
Merge pull request #8 from oetiker/sim-widget-tobi
odeimaiz Oct 16, 2018
169e461
Were moved somewhere else
Oct 16, 2018
7f05229
Merge branch 'feature/sim-widget' of github.com:odeimaiz/osparc-simco…
Oct 16, 2018
4dbc98b
Merge pull request #9 from sanderegg/feature/#233_api_sharing
odeimaiz Oct 16, 2018
fa75042
client director re-generated version 0 now
sanderegg Oct 16, 2018
c469013
re-generated director service models
sanderegg Oct 16, 2018
092bc97
minor
Oct 16, 2018
851d915
function(e) to e =>
Oct 16, 2018
2ce336f
deprecated files
Oct 16, 2018
5b33a78
fixed tests to newly generated models
sanderegg Oct 16, 2018
ff3af8b
sans-serif => Roboto
Oct 16, 2018
fb08e1a
re-generated director client code
sanderegg Oct 16, 2018
138ca1a
we use v0 development
sanderegg Oct 16, 2018
89362a1
fixed return enveloped data
sanderegg Oct 16, 2018
10211cd
Merge pull request #10 from sanderegg/feature/#233_api_sharing
odeimaiz Oct 16, 2018
67e1d65
updated readme
sanderegg Oct 16, 2018
2a3ce63
Show in logger when service is started
Oct 16, 2018
499eac0
removed status from envelope
sanderegg Oct 16, 2018
8caef08
minor
Oct 16, 2018
e40b405
re-generated models
sanderegg Oct 16, 2018
5c1490a
minor
Oct 16, 2018
0397614
some more tests
sanderegg Oct 16, 2018
f7d6671
reg-generated client sdk
sanderegg Oct 16, 2018
c0313e0
adapted to new api without status
sanderegg Oct 16, 2018
0702a77
webserver returns const {data, error} = requ.getResponse();
Oct 17, 2018
2669a16
Revert "adapted to new api without status"
sanderegg Oct 17, 2018
e258613
Merge pull request #12 from sanderegg/feature/#233_api_sharing
odeimaiz Oct 17, 2018
6fe6bcf
minor renaming
Oct 17, 2018
526191a
Workebench View also shows exposed nodes layout. Logic working as well
Oct 17, 2018
ca75391
Making pylint happy
Oct 17, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ matrix:
- pushd services/director; pip3 install -r requirements/ci.txt; popd
- pip3 install packages/director-sdk/python
- pushd services/web/server; pip3 install -r requirements/ci.txt; popd
- pip3 install -r apis/tests/requirements.txt
- pip3 install -r services/apihub/tests/requirements.txt

before_script:
- pylint --version
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ before_test:
${DOCKER_COMPOSE} -f packages/simcore-sdk/tests/docker-compose.yml build

run_test:
pytest -v apis/tests
pytest -v services/apihub/tests
pytest --cov=pytest_docker -v packages/pytest_docker/tests
pytest --cov=s3wrapper -v packages/s3wrapper/tests
pytest --cov=simcore_sdk -v packages/simcore-sdk/tests
Expand Down
87 changes: 87 additions & 0 deletions apis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# APIs development guidelines

# Concept

REST APIs and models (defined as openAPI- or JSON-schemas) are defined in a central location (/apis) to allow for "design-first" development.

# Development guidelines

## Standards

The oSparc platform uses the following standards:
- REST API: [Open API v3](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md)
- Models and configuration [JSON Schema](https://json-schema.org/)

## Folder structure

```bash
/apis/ # base folder
/apis/director/ # service name folder (e.g. for director service)
/apis/director/v0/ # service version (v0 for development, then v1, v2... only major)
/apis/director/v0/openapi.yaml # openapi specifications in YAML
/apis/director/v0/schemas/ # schemas only used by the director API
/apis/director/v0/schemas/services.yaml # openapi encoded service only schema

/apis/shared/ # shared apis/schemas base folder
/apis/shared/schemas/ # sub folder for schemas
/apis/shared/schemas/health_check.yaml # openapi encoded shared schema
/apis/shared/schemas/node-meta.json # jsonschema encoded shared schema
/apis/shared/schemas/v1/error.yaml # openapi encoded shaared schema for version 1
/apis/shared/schemas/v2/error.yaml # openapi encoded shaared schema for version 2

/tests/ # python tests folder to check schemas validity
/tests/requirements.txt # requirements for python tests
```

## Organization

### Openapi specifications file

Each API is defined within a file __openapi.yaml__ in YAML format. The file shall be located in the a subfolder named after the service/package and the major version subfolder.

#### Version subfolder

For initial development, the version shall be 0.1.0 and the subfolder v0
For release, the version shall start from 1.0.0 and subfolder v1.
The subolder digit corresponds to the version major digits. It shall be modified only when changes are not backwards compatible (e.g. changing a return value, removing parameters or resource, ...).

#### Schemas in separate files

Schemas shall always be defined in separate files.

Schemas format shall be either OpenAPI v3 or JSON schema Draft#7.

If these schemas are pertinent only to the current API they shall be contained together with the openapi specifications file inside a __schemas__ subfolder.
If these schemas are shared with other APIs they should be located in the __/shared/schemas__ subfolder.

#### Versioning shared schemas

NOTE: If shared schemas need backward incompatible changes, then a new major version of this specific shared schema is necessary and all APIs that rely on this specific schema will need to be upgraded.
In that case, a version subfolder shall be added in the __/shared/__ subfolder and the relevant schemas shall be moved there.

### Schemas defined with JSONSchema format that are used together with OpenAPI

Mixing JSONSchema with OpenAPI schema needs some additional steps:

1. Define the JSONSchema schema.
2. Convert the JSONSchema formatted file to OpenAPI formatted file using the [converter](../scripts/jsonschema/openapi_converter).
3. In the openapi specifications file ref the converted OpenAPI schema file.

## Using the openAPI

### Python: Current status (using aiohttp-apiset)

The current python-based packages use the aiohttp-apiset library to create routes from the defined API. The aiohttp-apiset library requires a physical file to create the routes. Therefore one needs to generate that file by following:

1. Generate a 1 file OpenAPI formatted file using [prance](https://pypi.org/project/prance/). By using [openapi-resolver](../scripts/openapi/oas_resolver).
2. Copy the generated file in a folder in the python-based code and use it.

### Python: in development and should be available soon

Using the library [openapi-core](https://github.com/p1c2u/openapi-core) the library is able to download the api at starting point.
The [apihub service](../services/apihub) serves the apis and schemas to the internal parts of the oSparc platform.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool


## references

- [defining reusable components - good practices](https://dev.to/mikeralphson/defining-reusable-components-with-the-openapi-specification-4077)
- [official guidelines on OAS re-usability](https://github.com/OAI/OpenAPI-Specification/blob/master/guidelines/v2.0/REUSE.md)
Loading