oeplatform
oeplatform copied to clipboard
The linked tables (input/output) in scenarios some times do not redirect to the tables detail page
Description of the issue
The linked tables (input/output) in scenarios some times do not redirect to the tables detail page see: https://openenergyplatform.org/scenario-bundles/id/dataedit/view/scenario/eu_leg_data_2021_rep_table_3
Steps to Reproduce
- Navigate to https://openenergyplatform.org/scenario-bundles/id/59cf408f-8ab1-7fe1-0175-e3e50e15eeaa
- In "scenarios" click on "input dataset" or "output dataset"
- You are redirected to a "create new bundle page"
-->
https://openenergyplatform.org/scenario-bundles/id/dataedit/view/scenario/eu_leg_data_2021_rep_table_3
Ideas of solution
The URN is appended to the current full URN. The URL to navigate to the tables detail pages is not defined correctly.
- remove this URN
/scenario-bundles/id
- then add this
dataedit/view/scenario/eu_leg_data_2021_rep_table_3
Context and Environment
- Version used:
- Operating system:
- Environment setup and (python) version:
Workflow checklist
- [ ] I am aware of the workflow in CONTRIBUTING.md
A bit off topic but related: @l-emele is there a reason why there is no explicit "input data" class in the OEO? We have "output data" OEO_00020013, but for the input data we reference OEO_00030029 in the tooltip. That makes sense in general, but I'm still wondering why that is.
After investigating the issue in more detail. We need to update the OEKG. There are some entries that come from an old, incorrectly implemented of the scenario bundles.
So there are multiple variations of a url / iri for a table from the schenario topic stored in the OEKG.
-
This one is working but not optimal because the url should not be fully hardcoded (see 3.)
"url": "https://openenergy-platform.org/dataedit/view/scenario/szenariendb_mmr_de"
-
Here the url/iri is wrong as the table readable name was used in the URN part:
"url": "https://openenergy-platform.org/dataedit/view/scenario/quality checked by EEA"
-
Here the url part https://openenergy-platform.org/ is not added because it can be added while adding the node to the oekg. This is better but as it is currently this variation will lead to the bug described in this issue:
"url": "dataedit/view/scenario/deutscher_projektionsbericht2023_rahmendaten"
The OEO class OEO_00030029 has the label exogeneous data
and the alternative label input data
.
I wonder, why we don't use the OEO terms here.
I see! I've installed Protege now, which makes things much easier :)
What do you mean by that? I have a guess, but since it seems to me that sometimes "terms" are used to describe different things, I'm not sure.
I wonder, why we don't use the OEO terms here. @l-emele
To provide more details to manually fix scenarios or implement a migration script, I will document the scenarios that contain broken links.
@han-f
Broken links:
"acronym": "WOM",
"id": "e9da6e0a-5592-3ca9-47e0-c8c011f834e3",
Error:
"label": "2016 greenhouse gas emission projections submitted by European Member States under the Monitoring Mechanism Regulation",
"url": "https://openenergy-platform.org/dataedit/view/scenario/quality checked by EEA"
"label": "2017 greenhouse gas emission projections submitted by European Member States under the Monitoring Mechanism Regulation",
"url": "https://openenergy-platform.org/dataedit/view/scenario/quality checked by EEA"
"label": "2018 greenhouse gas emission projections submitted by European Member States under the Monitoring Mechanism Regulation",
"url": "https://openenergy-platform.org/dataedit/view/scenario/quality checked by EEA"
"label": "2019 greenhouse gas emission projections submitted by European Member States under the Monitoring Mechanism Regulation",
"url": "https://openenergy-platform.org/dataedit/view/scenario/quality checked by EEA"
"label": "2020 greenhouse gas emission projections submitted by European Member States under the Monitoring Mechanism Regulation",
"url": "https://openenergy-platform.org/dataedit/view/scenario/quality checked by EEA and its Topic Center on Climate Change Mitigation and Energy"
"label": "2021 greenhouse gas emission projections submitted by European Member States under the Monitoring Mechanism Regulation",
"url": "https://openenergy-platform.org/dataedit/view/scenario/quality checked by EEA and its Topic Center on Climate Change Mitigation and Energy"
2.
"acronym": "WAM",
"id": "b7c25295-ee96-2af2-bca7-2af14ea78853",
--> Same as above
Related errors
I also noticed that the link from the datable page to the scenario bundle can only be found if the "url": field is set up correctly. For example, the url "url": "/dataedit/view/scenario/ksz2050_r2_ams2012_parameters_assumptions" would be correct. This is how the field is populated now (when you create a new scenario). I will fix this bug by changing the code that creates the relationships between data table and scenario bundle and reflects the result on the data table page.