Skip to content

Commit

Permalink
Link to examples (and remove some not so helpful examples). #136 / Op…
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed May 26, 2020
1 parent de60eac commit efc3150
Show file tree
Hide file tree
Showing 16 changed files with 172 additions and 330 deletions.
20 changes: 6 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,17 @@ script:
before_deploy:
- concat-json-files "*.json" -t "processes.json"
- git clone --branch gh-pages https://$GITHUB_TOKEN@github.com/Open-EO/openeo-processes.git gh-pages
- cd gh-pages
- |
if [[ $TRAVIS_BRANCH == 'master' ]] ; then
cp ../index.html index.html
cp ../processes.json processes.json
fi
- |
if [[ $TRAVIS_BRANCH == 'draft' ]] ; then
rm -rf draft
mkdir -p draft
cp ../index.html draft/index.html
cp ../processes.json draft/processes.json
rm -rf gh-pages/draft
mkdir -p gh-pages/draft
rsync -rv --exclude=gh-pages --exclude=tests . gh-pages/draft/
fi
- |
if [ -n "$TRAVIS_TAG" ] ; then
rm -rf $TRAVIS_TAG
mkdir -p $TRAVIS_TAG
cp ../index.html $TRAVIS_TAG/index.html
cp ../processes.json $TRAVIS_TAG/processes.json
rm -rf gh-pages/$TRAVIS_TAG
mkdir -p gh-pages/$TRAVIS_TAG
rsync -rv --exclude=gh-pages --exclude=tests . gh-pages/$TRAVIS_TAG/
fi
deploy:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `aggregate_temporal_period`
- `anomaly`
- `climatological_normal`
- Folder with examples (`examples/`). [#136](https://github.com/Open-EO/openeo-processes/issues/136)

### Changed
- Examples adapted to latest API version for `aggregate_temporal`, `array_contains`, `array_find`, `filter_labels`, `load_collection` and `rename_labels`. [#136](https://github.com/Open-EO/openeo-processes/issues/136), [API#285](https://github.com/Open-EO/openeo-api/issues/285)

### Removed
- Process graph examples from `arccos`, `arcsin`, `arctan`, `arsinh`, `artanh`, `e`, `ln` and `pi`. [API#285](https://github.com/Open-EO/openeo-api/issues/285)

### Fixed
- `load_collection`: Removed outdated `require` property from `value` callback parameter in process parameter `properties`.
Expand Down
20 changes: 0 additions & 20 deletions arccos.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,6 @@
"x": 1
},
"returns": 0
},
{
"process_graph": {
"cos1": {
"process_id": "cos",
"arguments": {
"x": 0.5
}
},
"arccos1": {
"process_id": "arccos",
"arguments": {
"x": {
"from_node": "cos1"
}
},
"result": true
}
},
"returns": 0.5
}
],
"links": [
Expand Down
20 changes: 0 additions & 20 deletions arcsin.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,6 @@
"x": 0
},
"returns": 0
},
{
"process_graph": {
"sin1": {
"process_id": "sin",
"arguments": {
"x": 0.5
}
},
"arcsin1": {
"process_id": "arcsin",
"arguments": {
"x": {
"from_node": "sin1"
}
},
"result": true
}
},
"returns": 0.5
}
],
"links": [
Expand Down
20 changes: 0 additions & 20 deletions arctan.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,6 @@
"x": 0
},
"returns": 0
},
{
"process_graph": {
"tan1": {
"process_id": "tan",
"arguments": {
"x": 0.5
}
},
"arctan1": {
"process_id": "arctan",
"arguments": {
"x": {
"from_node": "tan1"
}
},
"result": true
}
},
"returns": 0.5
}
],
"links": [
Expand Down
43 changes: 8 additions & 35 deletions array_contains.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,41 +32,6 @@
}
},
"examples": [
{
"title": "Check for `null` values",
"description": "Check whether the array contains a `null` value.",
"process_graph": {
"apply": {
"process_id": "array_apply",
"arguments": {
"data": {
"from_parameter": "data"
},
"process": {
"process-graph": {
"is_null": {
"process_id": "is_nodata",
"arguments": {
"from_parameter": "x"
},
"result": true
}
}
}
}
},
"find": {
"process_id": "array_contains",
"arguments": {
"data": {
"from_node": "apply"
},
"value": true
},
"result": true
}
}
},
{
"arguments": {
"data": [
Expand Down Expand Up @@ -163,6 +128,14 @@
"returns": false
}
],
"links": [
{
"rel": "example",
"type": "application/json",
"href": "https://processes.openeo.org/draft/examples/array_contains_null.json",
"title": "Check for `null` values in arrays"
}
],
"process_graph": {
"find": {
"process_id": "array_find",
Expand Down
43 changes: 8 additions & 35 deletions array_find.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,41 +37,6 @@
]
},
"examples": [
{
"title": "Find `null` values",
"description": "Get the index of the first `null` value in an array.",
"process_graph": {
"apply": {
"process_id": "array_apply",
"arguments": {
"data": {
"from_parameter": "data"
},
"process": {
"process-graph": {
"is_null": {
"process_id": "is_nodata",
"arguments": {
"from_parameter": "x"
},
"result": true
}
}
}
}
},
"find": {
"process_id": "array_find",
"arguments": {
"data": {
"from_node": "apply"
},
"value": true
},
"result": true
}
}
},
{
"arguments": {
"data": [
Expand Down Expand Up @@ -168,5 +133,13 @@
},
"returns": null
}
],
"links": [
{
"rel": "example",
"type": "application/json",
"href": "https://processes.openeo.org/draft/examples/array_find_null.json",
"title": "Find `null` values in arrays"
}
]
}
20 changes: 0 additions & 20 deletions arsinh.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,6 @@
"x": 0
},
"returns": 0
},
{
"process_graph": {
"sinh1": {
"process_id": "sinh",
"arguments": {
"x": 0.5
}
},
"arcsinh1": {
"process_id": "arsinh",
"arguments": {
"x": {
"from_node": "sinh1"
}
},
"result": true
}
},
"returns": 0.5
}
],
"links": [
Expand Down
20 changes: 0 additions & 20 deletions artanh.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,6 @@
"x": 0
},
"returns": 0
},
{
"process_graph": {
"cosh1": {
"process_id": "tanh",
"arguments": {
"x": 0.5
}
},
"arctanh1": {
"process_id": "artanh",
"arguments": {
"x": {
"from_node": "tanh1"
}
},
"result": true
}
},
"returns": 0.5
}
],
"links": [
Expand Down
21 changes: 0 additions & 21 deletions e.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,6 @@
"type": "number"
}
},
"examples": [
{
"title": "Test for ln(e) = 1",
"process_graph": {
"e1": {
"process_id": "e",
"arguments": {}
},
"ln1": {
"process_id": "ln",
"arguments": {
"data": {
"from_node": "e1"
}
},
"result": true
}
},
"returns": 1
}
],
"links": [
{
"rel": "about",
Expand Down
35 changes: 35 additions & 0 deletions examples/array_contains_null.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"summary": "Check for `null` values",
"description": "Check whether the array contains a `null` value.",
"process_graph": {
"apply": {
"process_id": "array_apply",
"arguments": {
"data": {
"from_parameter": "data"
},
"process": {
"process-graph": {
"is_null": {
"process_id": "is_nodata",
"arguments": {
"from_parameter": "x"
},
"result": true
}
}
}
}
},
"find": {
"process_id": "array_contains",
"arguments": {
"data": {
"from_node": "apply"
},
"value": true
},
"result": true
}
}
}
35 changes: 35 additions & 0 deletions examples/array_find_null.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"summary": "Find `null` values",
"description": "Get the index of the first `null` value in an array.",
"process_graph": {
"apply": {
"process_id": "array_apply",
"arguments": {
"data": {
"from_parameter": "data"
},
"process": {
"process-graph": {
"is_null": {
"process_id": "is_nodata",
"arguments": {
"from_parameter": "x"
},
"result": true
}
}
}
}
},
"find": {
"process_id": "array_find",
"arguments": {
"data": {
"from_node": "apply"
},
"value": true
},
"result": true
}
}
}
Loading

0 comments on commit efc3150

Please sign in to comment.