Skip to content
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

Support for Template Resources #8

Closed
p-a-s-c-a-l opened this issue Nov 20, 2019 · 11 comments
Closed

Support for Template Resources #8

p-a-s-c-a-l opened this issue Nov 20, 2019 · 11 comments
Assignees
Labels
BB: Map Component Map Component Building Block BB: Scenario Management Scenario Management Building Block enhancement New feature or request

Comments

@p-a-s-c-a-l
Copy link
Member

Support for Resources with variables.

@p-a-s-c-a-l p-a-s-c-a-l added enhancement New feature or request BB: Map Component Map Component Building Block BB: Scenario Management Scenario Management Building Block labels Nov 20, 2019
@p-a-s-c-a-l p-a-s-c-a-l self-assigned this Nov 20, 2019
@p-a-s-c-a-l p-a-s-c-a-l added this to Backlog: Low Priority in T1.3 Climate Services Co-creation via automation Nov 20, 2019
p-a-s-c-a-l added a commit that referenced this issue Nov 21, 2019
@p-a-s-c-a-l
Copy link
Member Author

JSON Example of a dp_variables term:

        {
            "type": "taxonomy_term--dp_variables",
            "id": "befdefda-f2a3-48e6-8986-78c02ac8ae5a",
            "attributes": {
                "drupal_internal__tid": 2256,
                "drupal_internal__revision_id": 2256,
                "langcode": "en",
                "revision_created": "2019-09-19T15:18:35+00:00",
                "revision_log_message": null,
                "status": true,
                "name": "emissions_scenario: Baseline (Scenario: Historical)",
                "description": {
                    "value": "\u003Cp\u003EIn baseline time period, we know exactly what happened so there are no emission scenarios.\u003C\/p\u003E\r\n\r\n\u003Cp\u003ETherefore, the \u0022Baseline\u0022 emissions scenario CAN\u0026nbsp;and MUST\u0026nbsp;be used with \u0022Baseline\u0022 time period!\u003C\/p\u003E\r\n\r\n\u003Cp\u003E\u0026nbsp;\u003C\/p\u003E\r\n",
                    "format": "basic_html",
                    "processed": "\u003Cp\u003EIn baseline time period, we know exactly what happened so there are no emission scenarios.\u003C\/p\u003E\n\n\u003Cp\u003ETherefore, the \u0022Baseline\u0022 emissions scenario CAN\u00a0and MUST\u00a0be used with \u0022Baseline\u0022 time period!\u003C\/p\u003E\n\n\u003Cp\u003E\u00a0\u003C\/p\u003E\n"
                },
                "weight": 0,
                "changed": "2019-09-23T12:20:14+00:00",
                "default_langcode": true,
                "revision_translation_affected": true,
                "path": {
                    "alias": null,
                    "pid": null,
                    "langcode": "en"
                },
                "field_var_meaning": null,
                "field_var_name": "emissions_scenario",
                "field_var_value": "Baseline"
            },
            "relationships": {
                "vid": {
                    "data": {
                        "type": "taxonomy_vocabulary--taxonomy_vocabulary",
                        "id": "8f682e27-a50f-4966-8164-a797127df26c"
                    },
                    "links": {
                        "self": {
                            "href": "https:\/\/csis.myclimateservice.eu\/jsonapi\/taxonomy_term\/dp_variables\/befdefda-f2a3-48e6-8986-78c02ac8ae5a\/relationships\/vid"
                        },
                        "related": {
                            "href": "https:\/\/csis.myclimateservice.eu\/jsonapi\/taxonomy_term\/dp_variables\/befdefda-f2a3-48e6-8986-78c02ac8ae5a\/vid"
                        }
                    }
                },
                "revision_user": {
                    "data": null,
                    "links": {
                        "self": {
                            "href": "https:\/\/csis.myclimateservice.eu\/jsonapi\/taxonomy_term\/dp_variables\/befdefda-f2a3-48e6-8986-78c02ac8ae5a\/relationships\/revision_user"
                        },
                        "related": {
                            "href": "https:\/\/csis.myclimateservice.eu\/jsonapi\/taxonomy_term\/dp_variables\/befdefda-f2a3-48e6-8986-78c02ac8ae5a\/revision_user"
                        }
                    }
                },
                "parent": {
                    "data": [
                        {
                            "type": "taxonomy_term--dp_variables",
                            "id": "virtual",
                            "meta": {
                                "links": {
                                    "help": {
                                        "href": "https:\/\/www.drupal.org\/docs\/8\/modules\/json-api\/core-concepts#virtual",
                                        "meta": {
                                            "about": "Usage and meaning of the \u0027virtual\u0027 resource identifier."
                                        }
                                    }
                                }
                            }
                        }
                    ],
                    "links": {
                        "self": {
                            "href": "https:\/\/csis.myclimateservice.eu\/jsonapi\/taxonomy_term\/dp_variables\/befdefda-f2a3-48e6-8986-78c02ac8ae5a\/relationships\/parent"
                        },
                        "related": {
                            "href": "https:\/\/csis.myclimateservice.eu\/jsonapi\/taxonomy_term\/dp_variables\/befdefda-f2a3-48e6-8986-78c02ac8ae5a\/parent"
                        }
                    }
                },
                "field_var_meaning2": {
                    "data": {
                        "type": "taxonomy_term--dp_variable_meanings",
                        "id": "c323b4ae-6ae9-4cd6-8896-351b5b34a8de"
                    },
                    "links": {
                        "self": {
                            "href": "https:\/\/csis.myclimateservice.eu\/jsonapi\/taxonomy_term\/dp_variables\/befdefda-f2a3-48e6-8986-78c02ac8ae5a\/relationships\/field_var_meaning2"
                        },
                        "related": {
                            "href": "https:\/\/csis.myclimateservice.eu\/jsonapi\/taxonomy_term\/dp_variables\/befdefda-f2a3-48e6-8986-78c02ac8ae5a\/field_var_meaning2"
                        }
                    }
                }
            },
            "links": {
                "self": {
                    "href": "https:\/\/csis.myclimateservice.eu\/jsonapi\/taxonomy_term\/dp_variables\/befdefda-f2a3-48e6-8986-78c02ac8ae5a"
                }
            }
        }

p-a-s-c-a-l added a commit that referenced this issue Nov 22, 2019
p-a-s-c-a-l added a commit that referenced this issue Nov 22, 2019
@p-a-s-c-a-l p-a-s-c-a-l moved this from Backlog: Low Priority to Backlog: Medium Priority in T1.3 Climate Services Co-creation Nov 22, 2019
p-a-s-c-a-l added a commit that referenced this issue Nov 22, 2019
@p-a-s-c-a-l
Copy link
Member Author

Another example of accidental complexity caused by incoherence: Variables in URI Templates are enclosed in ${} while the variables defind in the taxonomy are not. Updating the respective taxonomy terms isn't possible any more:

grafik

So we have to deal with that in the source code or mess around with the database.

p-a-s-c-a-l added a commit that referenced this issue Nov 26, 2019
@p-a-s-c-a-l
Copy link
Member Author

Each variable has to be manually added to the variables entityqueue in order to become available in the resource editor. See also clarity-h2020/docker-drupal#129

p-a-s-c-a-l added a commit that referenced this issue Nov 26, 2019
T1.3 Climate Services Co-creation automation moved this from Backlog: Medium Priority to Done Nov 27, 2019
@p-a-s-c-a-l

This comment has been minimized.

p-a-s-c-a-l added a commit that referenced this issue Dec 17, 2019
p-a-s-c-a-l added a commit that referenced this issue Dec 20, 2019
p-a-s-c-a-l added a commit that referenced this issue Dec 20, 2019
@p-a-s-c-a-l
Copy link
Member Author

done

T1.3 Climate Services Co-creation automation moved this from In Progress to Done Jan 29, 2020
T4.2 Catalogue of Elements at Risk and Adaptation Options automation moved this from In progress to Done Jan 29, 2020
@p-a-s-c-a-l
Copy link
Member Author

grafik

@p-a-s-c-a-l
Copy link
Member Author

grafik

@p-a-s-c-a-l
Copy link
Member Author

grafik

@p-a-s-c-a-l
Copy link
Member Author

grafik

@p-a-s-c-a-l
Copy link
Member Author

variable name variable vaules
STUDY_VARIANT BASELINE'
TIME_PERIOD Baseline', '20110101-20401231', '20410101-20701231', '20710101-21001231'
EMISSIONS_SCENARIO Baseline', 'rcp26', 'rcp45', 'rcp85'
EVENT_FREQUENCY Rare', 'Occasional', 'Frequent'

@p-a-s-c-a-l
Copy link
Member Author

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BB: Map Component Map Component Building Block BB: Scenario Management Scenario Management Building Block enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

1 participant