Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

[Unreleased]: <https://github.com/stac-extensions/application/compare/v1.0.0...HEAD>
[Unreleased]: <https://github.com/stac-extensions/application/compare/v0.1.0...HEAD>
58 changes: 46 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,17 @@ Example could be potentially incomplete code snippets that might be shown with c
This extension is the successor of the
[Example Links Extension](https://github.com/stac-extensions/example-links).

> [!NOTE]
> STAC is not best suited for describing applications through a STAC Item.
> This extension makes more sense to add additional context to geospatial data
> or can be used to describe applications in OGC API - Records.

- Examples:
- [Item example](examples/item.json): Shows the basic usage of the extension in a STAC Item
- [Catalog](examples/catalog.json): Links to all examples below
- [Jupyter Notebook](examples/jupyter-notebook.json)
- [Argo Workflow](examples/argo-workflow.json)
- [openEO UDP](examples/openeo-udp.json)
- [CWL / OGC Application Package](examples/cwl-application-package.json)
- [JSON Schema](json-schema/schema.json)
- [Changelog](./CHANGELOG.md)

Expand Down Expand Up @@ -64,8 +73,8 @@ If not provided, the referenced code is expected to have a single, unambiguous e
### application:languages

This fields lists all the languages the application is using, which can be programming or markup languages depending on the usecase.
Should be any of the [languages listed for Linguist](https://github.com/github-linguist/linguist/blob/master/lib/linguist/languages.yml),
e.g. `Python` or `R`.
Should be any of the [languages listed for Linguist](https://github.com/github-linguist/linguist/blob/master/lib/linguist/languages.yml)
if one exists (e.g. `Python` or `R`). Otherwise, custom values can be used (e.g. `openEO`).

This field MUST NOT contain the container language (see above).

Expand All @@ -74,11 +83,21 @@ See the [relation types](#relation-types) for when a reference is rendered inlin

Highlighting SHOULD only be applied when exactly one language is listed and no `application:container` is set.

## Container and Language Specifics

### Jupyter Notebooks

Additional information about Jupyter Notebooks can also be embedded into the
Jupyter Notbook metadata section directly, see also Annex C of the
[CEOS Jupyter Notbook Best Practices](https://ceos.org/document_management/Working_Groups/WGISS/Documents/WGISS%20Best%20Practices/CEOS_JupterNotebooks_Best%20Practice_v1.1.pdf).

### openEO

## Usage Examples

Examples can be provided directly as source code files or as a document with embedded code (e.g. web page, PDF document, Jupyter Notebook).

### Examples: Source Code Files
### Source Code Files

The Link Object for a Python application that is rather large and is expected to be executed directly:

Expand Down Expand Up @@ -109,7 +128,7 @@ highlighted code block:
}
```

### Examples: Code in a Container
### Code in a Container

The Link Object for a PDF document with C code:

Expand Down Expand Up @@ -178,25 +197,40 @@ The following types should be used as applicable `rel` types in the
| describedby | A reference to prose documentation (e.g. an HTML page or PDF) that describes the application (or data). Use this for content that "renders itself", i.e. should not be loaded and rendered as code example. |
| application | A reference to an application. |
| application-platform | A reference to a platform that can execute applications, can also list an application that has executed the application (see also [`processing:facility`](https://github.com/stac-extensions/processing)). |
| application-input | A reference to actual or example inputs for the application, e.g. a parameters file. |
| application-execute | A reference to an endpoint or URL that triggers execution of the application, e.g. an [OGC API - Processes](https://ogcapi.ogc.org/processes/) endpoint or a web-based user interface. |
| vcs | A reference to a version control system, e.g. the GitHub repository of the catalog or application. |
| manifest | A reference to a document describing the application in more detail, e.g. `package.json` (JavaScript), `pyproject.toml` (Python), or a CodeMeta file. |
| manifest | A reference to a document describing the application (may include its environment and dependencies) in more detail, e.g. `package.json` (JavaScript), `pyproject.toml` (Python), `environment.yml` (Conda), or a CodeMeta file. |

### application

As an alternative to linking to the application code, the processing extension
allows to embed the application code directly into the STAC entity via `processing:expression`.
This is commonly done for openEO processing results, for example.
It is important to note that this alternative is meant to be used only for describing how data was processed,
not for how it could be processed in the future.

## Media Types

The following media types could be used as applicable `type` in the Link and Asset Objects:

| Media Type | Description |
| -------------------------------- | ----------- |
| application/vnd.codemeta.ld+json | Refers to a [CodeMeta](https://codemeta.github.io/) file/response. |
| Media Type | Description |
| ----------------------------------------- | ----------- |
| application/x-ipynb+json | A [Jupyter Notebook](https://nbformat.readthedocs.io/). Use with `"application:container": "Jupyter Notebook"`. |
| application/vnd.openeo+json;type=process | An [openEO](https://openeo.org) user-defined process (UDP). Use with `"application:languages": ["openEO"]`. |
| application/cwl, application/cwl+yaml, application/cwl+json | A [Common Workflow Language](https://www.commonwl.org) document (e.g. an [OGC Application Package](https://docs.ogc.org/bp/20-089r1.html)), either encoding, YAML or JSON. Use with `"application:container": "Common Workflow Language"`. |
| application/x-argo-workflow-yaml | An [Argo Workflows](https://argo-workflows.readthedocs.io/) manifest. Use with `"application:container": "Argo Workflow"`. |
| application/vnd.codemeta.ld+json | Refers to a [CodeMeta](https://codemeta.github.io/) file/response. |

## Roles

The following types should be used as applicable `roles` in the Link or
[Asset Object](https://github.com/radiantearth/stac-spec/blob/master/commons/assets.md#asset-object).

| Type | Description |
| ------- | ----------- |
| example | A reference to example data. |
| Role | Description |
| -------- | ----------- |
| example | Example data, see the `example` relation type for more details. |
| manifest | A manifest filet, see the `manifest` relation tyope for more details. |

## Contributing

Expand Down
68 changes: 68 additions & 0 deletions examples/argo-workflow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"stac_version": "1.1.0",
"stac_extensions": [
"https://stac-extensions.github.io/application/v0.1.0/schema.json"
],
"id": "polaris",
"type": "Feature",
"geometry": null,
"properties": {
"datetime": "2025-02-19T23:00:00Z",
"title": "POLARIS",
"description": "Polar Operational Limit Assessment Risk Index System (POLARIS) algorithm.",
"license": "CC-BY-SA-4.0",
"application:container": "Argo Workflow",
"application:languages": [
"Python"
]
},
"links": [
{
"rel": "root",
"href": "./catalog.json",
"type": "application/json",
"title": "Application examples"
},
{
"rel": "parent",
"href": "./catalog.json",
"type": "application/json",
"title": "Application examples"
},
{
"rel": "self",
"href": "https://stac-extensions.github.io/application/v0.1.0/examples/argo-workflow.json",
"type": "application/json"
},
{
"rel": "vcs",
"href": "https://github.com/gtif-cerulean/polaris.git",
"title": "Git source repository",
"vcs:type": "git",
"vcs:branch": "main"
},
{
"rel": "application",
"href": "https://github.com/gtif-cerulean/polaris/blob/main/workflow.yml",
"title": "POLARIS workflow",
"type": "application/x-argo-workflow-yaml",
"application:container": "Argo Workflow",
"application:languages": [
"Python"
]
},
{
"rel": "application-platform",
"href": "https://workspace.cif.hub-otc.eox.at/",
"title": "EOxHub Workspaces",
"type": "text/html"
},
{
"rel": "application-execute",
"href": "https://harshness-map.gtif.eox.at/processes/execute-polaris",
"title": "Trigger the workflow via pygeoapi",
"type": "text/html"
}
],
"assets": {}
}
43 changes: 43 additions & 0 deletions examples/catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"stac_version": "1.1.0",
"type": "Catalog",
"id": "application-examples",
"description": "Examples for the Application extension, one per application type.",
"links": [
{
"rel": "root",
"href": "./catalog.json",
"type": "application/json",
"title": "Application examples"
},
{
"rel": "self",
"href": "https://stac-extensions.github.io/application/v0.1.0/examples/catalog.json",
"type": "application/json"
},
{
"rel": "child",
"href": "./jupyter-notebook.json",
"type": "application/json",
"title": "Jupyter Notebook"
},
{
"rel": "child",
"href": "./argo-workflow.json",
"type": "application/json",
"title": "Argo Workflow"
},
{
"rel": "child",
"href": "./openeo-udp.json",
"type": "application/json",
"title": "openEO UDP"
},
{
"rel": "child",
"href": "./cwl-application-package.json",
"type": "application/json",
"title": "CWL / OGC Application Package"
}
]
}
56 changes: 56 additions & 0 deletions examples/cwl-application-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"stac_version": "1.1.0",
"stac_extensions": [
"https://stac-extensions.github.io/application/v0.1.0/schema.json"
],
"id": "fairsendd",
"type": "Feature",
"geometry": null,
"properties": {
"datetime": "2025-01-01T00:00:00Z",
"title": "FAIRSenDD: FAIR workflow for Sentinel-1 based Deforestation Detection",
"description": "Detects forest change in Sentinel-1 time series using Recurrence Quantification Analysis, published as an OGC Application Package.",
"license": "MIT",
"application:container": "Common Workflow Language",
"application:languages": [
"Julia"
]
},
"links": [
{
"rel": "root",
"href": "./catalog.json",
"type": "application/json",
"title": "Application examples"
},
{
"rel": "parent",
"href": "./catalog.json",
"type": "application/json",
"title": "Application examples"
},
{
"rel": "self",
"href": "https://stac-extensions.github.io/application/v0.1.0/examples/cwl-application-package.json",
"type": "application/json"
},
{
"rel": "vcs",
"href": "https://github.com/EarthyScience/FAIRSenDD",
"title": "Git source repository",
"vcs:type": "git",
"vcs:branch": "main"
},
{
"rel": "application",
"href": "https://raw.githubusercontent.com/EarthyScience/FAIRSenDD/refs/heads/main/ogc-app-cwl/fairsendd.cwl",
"title": "OGC Application Package",
"type": "application/cwl+yaml",
"application:container": "Common Workflow Language",
"application:languages": [
"Julia"
]
}
],
"assets": {}
}
65 changes: 19 additions & 46 deletions examples/item.json → examples/jupyter-notebook.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"geometry": null,
"properties": {
"datetime": "2025-03-17T14:30:23Z",
"type": "workflow",
"title": "ESA CCI permafrost",
"description": "cube generation workflow for esa-cci-permafrost",
"description": "Cube generation workflow for esa-cci-permafrost.",
"application:container": "Jupyter Notebook",
"application:languages": [
"Python"
Expand All @@ -19,83 +18,57 @@
"links": [
{
"rel": "root",
"href": "../../catalog.json",
"href": "./catalog.json",
"type": "application/json",
"title": "Open Science Catalog"
"title": "Application examples"
},
{
"rel": "parent",
"href": "../catalog.json",
"href": "./catalog.json",
"type": "application/json",
"title": "Workflows"
"title": "Application examples"
},
{
"rel": "self",
"href": "https://esa-earthcode.github.io/open-science-catalog-metadata/workflows/esa-cci-permafrost/record.json",
"href": "https://stac-extensions.github.io/application/v0.1.0/examples/jupyter-notebook.json",
"type": "application/json"
},
{
"rel": "related",
"href": "../../projects/deep-earth-system-data-lab/collection.json",
"type": "application/json",
"title": "Project: DeepESDL"
},
{
"rel": "child",
"href": "../../experiments/esa-cci-permafrost/record.json",
"type": "application/json",
"title": "ESA CCI permafrost"
},
{
"rel": "related",
"href": "../../themes/cryosphere/catalog.json",
"type": "application/json",
"title": "Theme: Cryosphere"
},
{
"rel": "vcs",
"title": "Git source repository",
"href": "https://github.com/deepesdl/cube-gen.git",
"title": "Git source repository",
"vcs:type": "git",
"vcs:branch": "main"
},
{
"rel": "application",
"title": "Jupyter Notebook: Create CCI Permafrost cube",
"href": "https://github.com/deepesdl/cube-gen/blob/main/Permafrost/Create-CCI-Permafrost-cube-EarthCODE.ipynb",
"file:local_path": "Permafrost/Create-CCI-Permafrost-cube-EarthCODE.ipynb",
"title": "Create CCI Permafrost cube",
"type": "application/x-ipynb+json",
"file:local_path": "Permafrost/Create-CCI-Permafrost-cube-EarthCODE.ipynb",
"application:container": "Jupyter Notebook",
"application:languages": [
"Python"
],
"jupyter:kernel": {
"name": "deepesdl-xcube-1.8.3",
"pythonVersion": "3.11",
"envFile": "https://github.com/deepesdl/cube-gen/blob/main/Permafrost/environment.yml"
}
]
},
{
"rel": "example",
"title": "Cube generation script",
"href": "https://github.com/deepesdl/cube-gen/blob/main/Permafrost/cube.py",
"type": "text/x-python",
"application:entrypoint": "generate_cube",
"application:languages": [
"Python"
]
"rel": "manifest",
"href": "https://github.com/deepesdl/cube-gen/blob/main/Permafrost/environment.yml",
"title": "conda environment",
"type": "application/yaml"
},
{
"rel": "application-platform",
"title": "DeepESDL platform",
"href": "https://deep.earthsystemdatalab.net/",
"title": "DeepESDL platform",
"type": "text/html"
},
{
"rel": "related",
"rel": "application-execute",
"href": "https://deep.earthsystemdatalab.net/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fdeepesdl%2Fcube-gen&urlpath=lab%2Ftree%2Fcube-gen%2FPermafrost%2FCreate-CCI-Permafrost-cube-EarthCODE.ipynb&branch=main",
"title": "Open notebook on the DeepESDL platform"
"title": "Open the notebook on the DeepESDL platform",
"type": "text/html"
}
],
"assets": {}
}
}
Loading