OpenEnergyPlatform / oeplatform

Repository for the code of the Open Energy Platform (OEP) website. The OEP provides an interface to the Open Energy Family
http://openenergyplatform.org/
GNU Affero General Public License v3.0
61 stars 19 forks source link

Migrate the current "Publication" & "model", "framework" factsheets data into a new structure. #1705

Closed jh-RLI closed 1 week ago

jh-RLI commented 2 weeks ago

Description of the issue

Once we merge https://github.com/OpenEnergyPlatform/oeplatform/pull/1704 the information currently available in "Publications" will not be valid anymore.

Same applies to the updated structure of the models / framework factsheets.

Additionally: Implement an api to get all current scenario bundles in json-ld format.

Ideas of solution

We need to provide a migration script that updates the scenario bundles in the OEKG. Current factsheets are stored as key-value pairs:

    report_title = request_body["report_title"]
    date_of_publication = request_body["date_of_publication"]
    report_doi = request_body["report_doi"]
    place_of_publication = request_body["place_of_publication"]
    link_to_study = request_body["link_to_study_report"]
    authors = request_body["authors"]

The update introduces a new key-value pair that stores a list of objects as a value instead of a single value. In addition, some key names have changed slightly:

  publications : [{
    id: uuid(),
    report_title: '',
    authors: [],
    doi: '',
    link_to_study_report: '',
    date_of_publication: '',
  } ]

Model & framework factsheet now use a "url" field instead of "IRI" field.

Workflow checklist