diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b09f6e3d..83dbed5b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,11 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Inject env variables - uses: rlespinasse/github-slug-action@v3.x - - uses: actions/setup-node@v3 + uses: rlespinasse/github-slug-action@v4 + - uses: actions/setup-node@v4 with: node-version: 'lts/*' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | npm install npm run generate diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 25659365..8781b1fa 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,10 +4,10 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 'lts/*' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run linter run: | npm install diff --git a/CHANGELOG.md b/CHANGELOG.md index 559e73d3..5e6784e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,13 +16,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `clip`: Throw an exception if min > max [#472](https://github.com/Open-EO/openeo-processes/issues/472) - `save_results`: Returns the STAC resource instead of boolean `true` [API#376](https://github.com/Open-EO/openeo-api/issues/376) +- Added a uniqueness contraint to various array-typed parameters (e.g. lists of dimension names or labels) +- Renamed `create_data_cube` to `create_cube`. [#68](https://github.com/Open-EO/openeo-processes/issues/68) +- `apply_polygon`: Renamed `polygons` parameter to `geometries` for better alignment with other geometry handling processes. [#511](https://github.com/Open-EO/openeo-processes/issues/511) ### Fixed +- Clarified for various mathematical functions the defined input and output ranges. Mention that `NaN` is returned outside of the defined input range where possible. +- `aggregate_temporal` and `aggregate_temporal_period`: Clarified that the process throws a `DimensionNotAvailable` exception when no temporal dimension exists. +- `aggregate_temporal_period`: Removed unused exception `DistinctDimensionLabelsRequired` +- `aggregate_temporal_period`: Clarified that the definition of weeks follows ISO 8601 +- `divide`: Clarified behavior for division by 0 - `between`: Clarify that `null` is passed through. - `eq` and `neq`: Explicitly set the minimum value for the `delta` parameter. - `filter_bbox`, `load_collection`, `load_stac`: Clarified that the bounding box is reprojected to the CRS of the spatial data cube dimensions if required. - `filter_spatial`: Clarified that masking is applied using the given geometries. [#469](https://github.com/Open-EO/openeo-processes/issues/469) +- `mod`: Clarified behavior for y = 0 - `sqrt`: Clarified that NaN is returned for negative numbers. ## [2.0.0-rc.1] - 2023-05-25 diff --git a/absolute.json b/absolute.json index 3b6e91dc..c6a3713d 100644 --- a/absolute.json +++ b/absolute.json @@ -1,7 +1,7 @@ { "id": "absolute", "summary": "Absolute value", - "description": "Computes the absolute value of a real number `x`, which is the \"unsigned\" portion of x and often denoted as *|x|*.\n\nThe no-data value `null` is passed through and therefore gets propagated.", + "description": "Computes the absolute value of a real number `x`, which is the \"unsigned\" portion of `x` and often denoted as *|x|*.\n\nThe no-data value `null` is passed through and therefore gets propagated.", "categories": [ "math" ], @@ -95,4 +95,4 @@ "result": true } } -} \ No newline at end of file +} diff --git a/aggregate_temporal.json b/aggregate_temporal.json index ad1d560b..2c66e0f2 100644 --- a/aggregate_temporal.json +++ b/aggregate_temporal.json @@ -128,6 +128,7 @@ "description": "Distinct labels for the intervals, which can contain dates and/or times. Is only required to be specified if the values for the start of the temporal intervals are not distinct and thus the default labels would not be unique. The number of labels and the number of groups need to be equal.", "schema": { "type": "array", + "uniqueItems": true, "items": { "type": [ "number", @@ -140,7 +141,7 @@ }, { "name": "dimension", - "description": "The name of the temporal dimension for aggregation. All data along the dimension is passed through the specified reducer. If the dimension is not set or set to `null`, the data cube is expected to only have one temporal dimension. Fails with a `TooManyDimensions` exception if it has more dimensions. Fails with a `DimensionNotAvailable` exception if the specified dimension does not exist.", + "description": "The name of the temporal dimension for aggregation. All data along the dimension is passed through the specified reducer. If the dimension is not set or set to `null`, the data cube is expected to only have one temporal dimension. Fails with a `TooManyDimensions` exception if it has more dimensions. Fails with a `DimensionNotAvailable` exception if the specified dimension does not exist or no temporal dimension is available.", "schema": { "type": [ "string", @@ -228,7 +229,7 @@ "message": "The data cube contains multiple temporal dimensions. The parameter `dimension` must be specified." }, "DimensionNotAvailable": { - "message": "A dimension with the specified name does not exist." + "message": "A dimension with the specified name does not exist or no temporal dimension is available." }, "DistinctDimensionLabelsRequired": { "message": "The dimension labels have duplicate values. Distinct labels must be specified." diff --git a/aggregate_temporal_period.json b/aggregate_temporal_period.json index bdaea43e..446afa8d 100644 --- a/aggregate_temporal_period.json +++ b/aggregate_temporal_period.json @@ -23,7 +23,7 @@ }, { "name": "period", - "description": "The time intervals to aggregate. The following pre-defined values are available:\n\n* `hour`: Hour of the day\n* `day`: Day of the year\n* `week`: Week of the year\n* `dekad`: Ten day periods, counted per year with three periods per month (day 1 - 10, 11 - 20 and 21 - end of month). The third dekad of the month can range from 8 to 11 days. For example, the third dekad of a year spans from January 21 till January 31 (11 days), the fourth dekad spans from February 1 till February 10 (10 days) and the sixth dekad spans from February 21 till February 28 or February 29 in a leap year (8 or 9 days respectively).\n* `month`: Month of the year\n* `season`: Three month periods of the calendar seasons (December - February, March - May, June - August, September - November).\n* `tropical-season`: Six month periods of the tropical seasons (November - April, May - October).\n* `year`: Proleptic years\n* `decade`: Ten year periods ([0-to-9 decade](https://en.wikipedia.org/wiki/Decade#0-to-9_decade)), from a year ending in a 0 to the next year ending in a 9.\n* `decade-ad`: Ten year periods ([1-to-0 decade](https://en.wikipedia.org/wiki/Decade#1-to-0_decade)) better aligned with the anno Domini (AD) calendar era, from a year ending in a 1 to the next year ending in a 0.", + "description": "The time intervals to aggregate. The following pre-defined values are available:\n\n* `hour`: Hour of the day\n* `day`: Day of the year\n* `week`: Week of the year as defined in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Week_dates)\n* `dekad`: Ten day periods, counted per year with three periods per month (day 1 - 10, 11 - 20 and 21 - end of month). The third dekad of the month can range from 8 to 11 days. For example, the third dekad of a year spans from January 21 till January 31 (11 days), the fourth dekad spans from February 1 till February 10 (10 days) and the sixth dekad spans from February 21 till February 28 or February 29 in a leap year (8 or 9 days respectively).\n* `month`: Month of the year\n* `season`: Three month periods of the calendar seasons (December - February, March - May, June - August, September - November).\n* `tropical-season`: Six month periods of the tropical seasons (November - April, May - October).\n* `year`: Proleptic years\n* `decade`: Ten year periods ([0-to-9 decade](https://en.wikipedia.org/wiki/Decade#0-to-9_decade)), from a year ending in a 0 to the next year ending in a 9.\n* `decade-ad`: Ten year periods ([1-to-0 decade](https://en.wikipedia.org/wiki/Decade#1-to-0_decade)) better aligned with the anno Domini (AD) calendar era, from a year ending in a 1 to the next year ending in a 0.", "schema": { "type": "string", "enum": [ @@ -78,7 +78,7 @@ }, { "name": "dimension", - "description": "The name of the temporal dimension for aggregation. All data along the dimension is passed through the specified reducer. If the dimension is not set or set to `null`, the source data cube is expected to only have one temporal dimension. Fails with a `TooManyDimensions` exception if it has more dimensions. Fails with a `DimensionNotAvailable` exception if the specified dimension does not exist.", + "description": "The name of the temporal dimension for aggregation. All data along the dimension is passed through the specified reducer. If the dimension is not set or set to `null`, the source data cube is expected to only have one temporal dimension. Fails with a `TooManyDimensions` exception if it has more dimensions. Fails with a `DimensionNotAvailable` exception if the specified dimension does not exist or no temporal dimension is available.", "schema": { "type": [ "string", @@ -115,10 +115,7 @@ "message": "The data cube contains multiple temporal dimensions. The parameter `dimension` must be specified." }, "DimensionNotAvailable": { - "message": "A dimension with the specified name does not exist." - }, - "DistinctDimensionLabelsRequired": { - "message": "The dimension labels have duplicate values. Distinct labels must be specified." + "message": "A dimension with the specified name does not exist or no temporal dimension is available." } }, "links": [ diff --git a/arccos.json b/arccos.json index 5ffbce35..4cd498a7 100644 --- a/arccos.json +++ b/arccos.json @@ -1,29 +1,32 @@ { "id": "arccos", "summary": "Inverse cosine", - "description": "Computes the arc cosine of `x`. The arc cosine is the inverse function of the cosine so that *`arccos(cos(x)) = x`*.\n\nWorks on radians only.\nThe no-data value `null` is passed through and therefore gets propagated.", + "description": "Computes the arc cosine of `x`. The arc cosine is the inverse function of the cosine so that *`arccos(cos(x)) = x`*.\n\nWorks on radians only.\nThe no-data value `null` is passed through and therefore gets propagated. `NaN` is returned for values outside of the allowed range.", "categories": [ "math > trigonometric" ], "parameters": [ { "name": "x", - "description": "A number.", + "description": "A number in the range *[-1, 1]*.", "schema": { "type": [ "number", "null" - ] + ], + "minimum": -1, + "maximum": 1 } } ], "returns": { - "description": "The computed angle in radians.", + "description": "The computed angle in radians in the range *[0, π]*.", "schema": { "type": [ "number", "null" - ] + ], + "minimum": 0 } }, "examples": [ @@ -41,4 +44,4 @@ "title": "Inverse cosine explained by Wolfram MathWorld" } ] -} \ No newline at end of file +} diff --git a/arcosh.json b/arcosh.json index 6ed581fe..820b8cd4 100644 --- a/arcosh.json +++ b/arcosh.json @@ -1,29 +1,31 @@ { "id": "arcosh", "summary": "Inverse hyperbolic cosine", - "description": "Computes the inverse hyperbolic cosine of `x`. It is the inverse function of the hyperbolic cosine so that *`arcosh(cosh(x)) = x`*.\n\nWorks on radians only.\nThe no-data value `null` is passed through and therefore gets propagated.", + "description": "Computes the inverse hyperbolic cosine of `x`. It is the inverse function of the hyperbolic cosine so that *`arcosh(cosh(x)) = x`*.\n\nThe no-data value `null` is passed through and therefore gets propagated. `NaN` is returned for values outside of the allowed range.", "categories": [ "math > trigonometric" ], "parameters": [ { "name": "x", - "description": "A number.", + "description": "A number in the range *[1, +∞)*.", "schema": { "type": [ "number", "null" ] - } + }, + "minimum": 1 } ], "returns": { - "description": "The computed angle in radians.", + "description": "The computed hyperbolic angle in radians in the range *[0, +∞)*.", "schema": { "type": [ "number", "null" - ] + ], + "minimum": 0 } }, "examples": [ @@ -41,4 +43,4 @@ "title": "Inverse hyperbolic cosine explained by Wolfram MathWorld" } ] -} \ No newline at end of file +} diff --git a/arcsin.json b/arcsin.json index e37eb2d3..2c772a00 100644 --- a/arcsin.json +++ b/arcsin.json @@ -1,24 +1,26 @@ { "id": "arcsin", "summary": "Inverse sine", - "description": "Computes the arc sine of `x`. The arc sine is the inverse function of the sine so that *`arcsin(sin(x)) = x`*.\n\nWorks on radians only.\nThe no-data value `null` is passed through and therefore gets propagated.", + "description": "Computes the arc sine of `x`. The arc sine is the inverse function of the sine so that *`arcsin(sin(x)) = x`*.\n\nWorks on radians only.\nThe no-data value `null` is passed through and therefore gets propagated. `NaN` is returned for values < -1 and > 1.", "categories": [ "math > trigonometric" ], "parameters": [ { "name": "x", - "description": "A number.", + "description": "A number in the range *[-1, 1]*.", "schema": { "type": [ "number", "null" - ] + ], + "minimum": -1, + "maximum": 1 } } ], "returns": { - "description": "The computed angle in radians.", + "description": "The computed angle in radians in the range *[-π/2, π/2]*.", "schema": { "type": [ "number", @@ -41,4 +43,4 @@ "title": "Inverse sine explained by Wolfram MathWorld" } ] -} \ No newline at end of file +} diff --git a/arctan.json b/arctan.json index dc8d5a68..9461eba3 100644 --- a/arctan.json +++ b/arctan.json @@ -18,7 +18,7 @@ } ], "returns": { - "description": "The computed angle in radians.", + "description": "The computed angle in radians in the range *(−π/2, π/2)*.", "schema": { "type": [ "number", @@ -41,4 +41,4 @@ "title": "Inverse tangent explained by Wolfram MathWorld" } ] -} \ No newline at end of file +} diff --git a/arsinh.json b/arsinh.json index 37384dcd..2b7942dd 100644 --- a/arsinh.json +++ b/arsinh.json @@ -1,7 +1,7 @@ { "id": "arsinh", "summary": "Inverse hyperbolic sine", - "description": "Computes the inverse hyperbolic sine of `x`. It is the inverse function of the hyperbolic sine so that *`arsinh(sinh(x)) = x`*.\n\nWorks on radians only.\nThe no-data value `null` is passed through and therefore gets propagated.", + "description": "Computes the inverse hyperbolic sine of `x`. It is the inverse function of the hyperbolic sine so that *`arsinh(sinh(x)) = x`*.\n\nThe no-data value `null` is passed through and therefore gets propagated.", "categories": [ "math > trigonometric" ], @@ -18,7 +18,7 @@ } ], "returns": { - "description": "The computed angle in radians.", + "description": "The computed hyperbolic angle in radians.", "schema": { "type": [ "number", @@ -41,4 +41,4 @@ "title": "Inverse hyperbolic sine explained by Wolfram MathWorld" } ] -} \ No newline at end of file +} diff --git a/artanh.json b/artanh.json index 926b48ea..6308290d 100644 --- a/artanh.json +++ b/artanh.json @@ -1,24 +1,26 @@ { "id": "artanh", "summary": "Inverse hyperbolic tangent", - "description": "Computes the inverse hyperbolic tangent of `x`. It is the inverse function of the hyperbolic tangent so that *`artanh(tanh(x)) = x`*.\n\nWorks on radians only.\nThe no-data value `null` is passed through and therefore gets propagated.", + "description": "Computes the inverse hyperbolic tangent of `x`. It is the inverse function of the hyperbolic tangent so that *`artanh(tanh(x)) = x`*.\n\nThe no-data value `null` is passed through and therefore gets propagated. `NaN` is returned for values outside of the allowed range. The computations follow [IEEE Standard 754](https://ieeexplore.ieee.org/document/8766229) whenever the processing environment supports it. Therefore, `x` = 1 results in +infinity and `x` = 0 results in -infinity. Otherwise, an exception is thrown.", "categories": [ "math > trigonometric" ], "parameters": [ { "name": "x", - "description": "A number.", + "description": "A number in the range *(-1, 1)*.", "schema": { "type": [ "number", "null" - ] + ], + "minimumExclusive": -1, + "maximumExclusive": 1 } } ], "returns": { - "description": "The computed angle in radians.", + "description": "The computed hyperbolic angle in radians.", "schema": { "type": [ "number", @@ -39,6 +41,11 @@ "rel": "about", "href": "http://mathworld.wolfram.com/InverseHyperbolicTangent.html", "title": "Inverse hyperbolic tangent explained by Wolfram MathWorld" + }, + { + "rel": "about", + "href": "https://ieeexplore.ieee.org/document/4610935", + "title": "IEEE Standard 754-2008 for Floating-Point Arithmetic" } ] -} \ No newline at end of file +} diff --git a/cos.json b/cos.json index 6e6e4143..0d6229a8 100644 --- a/cos.json +++ b/cos.json @@ -18,12 +18,14 @@ } ], "returns": { - "description": "The computed cosine of `x`.", + "description": "The computed cosine in the range *[-1, 1]*.", "schema": { "type": [ "number", "null" - ] + ], + "minimum": -1, + "maximum": 1 } }, "examples": [ @@ -41,4 +43,4 @@ "title": "Cosine explained by Wolfram MathWorld" } ] -} \ No newline at end of file +} diff --git a/cosh.json b/cosh.json index 975958a4..8b56a222 100644 --- a/cosh.json +++ b/cosh.json @@ -1,14 +1,14 @@ { "id": "cosh", "summary": "Hyperbolic cosine", - "description": "Computes the hyperbolic cosine of `x`.\n\nWorks on radians only.\nThe no-data value `null` is passed through and therefore gets propagated.", + "description": "Computes the hyperbolic cosine of `x`.\n\nThe no-data value `null` is passed through and therefore gets propagated.", "categories": [ "math > trigonometric" ], "parameters": [ { "name": "x", - "description": "An angle in radians.", + "description": "An hyperbolic angle in radians.", "schema": { "type": [ "number", @@ -18,12 +18,13 @@ } ], "returns": { - "description": "The computed hyperbolic cosine of `x`.", + "description": "The computed hyperbolic cosine in the range *[1, +∞)*.", "schema": { "type": [ "number", "null" - ] + ], + "minimum": 1 } }, "examples": [ @@ -41,4 +42,4 @@ "title": "Hyperbolic cosine explained by Wolfram MathWorld" } ] -} \ No newline at end of file +} diff --git a/create_data_cube.json b/create_cube.json similarity index 95% rename from create_data_cube.json rename to create_cube.json index 55f0aede..0f8c7ca2 100644 --- a/create_data_cube.json +++ b/create_cube.json @@ -1,5 +1,5 @@ { - "id": "create_data_cube", + "id": "create_cube", "summary": "Create an empty data cube", "description": "Creates a new data cube without dimensions. Dimensions can be added with ``add_dimension()``.", "categories": [ diff --git a/dev/docs.html b/dev/docs.html index 04b1c192..0a7d005e 100644 --- a/dev/docs.html +++ b/dev/docs.html @@ -5,7 +5,7 @@ openEO API Processes - +