DPGAlliance / publicgoods-scripts

Scripts to generate static site from WordPress
http://digitalpublicgoods.net
MIT License
4 stars 6 forks source link

Breaking Changes in `sgds` JSON of API Structure of WebApp 2.0 deployment #179

Closed nathanfletcher closed 1 year ago

nathanfletcher commented 1 year ago

Expected Behaviour: Publicgoods-script successfully builds graph visualization on registry page of DPG website via GitHub Actions.

Trace: Current breaking build log can be seen here

Why Major Update to the API introduced a change in structure to the sdgs key of the API in the public goods review-web app During the build of the registry page, key is responsible for graph visualization and some counting metrics.

eg Application ID 10216

Version 1.0 Structure for sdgs key

"sdgs": [
            {
                "sdg": "SDG4: Quality Education",
                "relevance": "TOAEP has been built to indefinitely provide free and immediate access to quality publications on international law to anyone with access to the Internet, regardless of their geographical location. TOAEP will remain non-profit and open access. As such, TOAEP is aligned with Goal 4 of the Sustainable Development Goals (‘SDGs’) (that is, it will “ensure inclusive and equitable quality education and promote lifelong learning opportunities for all”).,
 
TOAEP is directly aimed at Goal 16 of the SDGs (that is, to “promote peaceful and inclusive societies for sustainable development, provide access to justice for all and build effective, accountable and inclusive institutions at all levels”). By publishing open access international law information, including on international criminal law, TOAEP aims to equip individuals with the knowledge required to ensure that there is accountability for core international crimes in their societies, organisations and countries."
            },
            {
                "sdg": "SDG16: Peace¸ Justice and Strong Institutions",
                "relevance": "TOAEP has been built to indefinitely provide free and immediate access to quality publications on international law to anyone with access to the Internet, regardless of their geographical location. TOAEP will remain non-profit and open access. As such, TOAEP is aligned with Goal 4 of the Sustainable Development Goals (‘SDGs’) (that is, it will “ensure inclusive and equitable quality education and promote lifelong learning opportunities for all”).,
 
TOAEP is directly aimed at Goal 16 of the SDGs (that is, to “promote peaceful and inclusive societies for sustainable development, provide access to justice for all and build effective, accountable and inclusive institutions at all levels”). By publishing open access international law information, including on international criminal law, TOAEP aims to equip individuals with the knowledge required to ensure that there is accountability for core international crimes in their societies, organisations and countries."
            }
        ],

Version 2.0 Structure for sdgs key

"sdgs": {
            "sdg": [
                "SDG4: Quality Education",
                "SDG16: Peace¸ Justice and Strong Institutions"
            ],
            "relevance": "TOAEP has been built to indefinitely provide free and immediate access to quality publications on international law to anyone with access to the Internet, regardless of their geographical location. TOAEP will remain non-profit and open access. As such, TOAEP is aligned with Goal 4 of the Sustainable Development Goals (\u2018SDGs\u2019) (that is, it will \u201censure inclusive and equitable quality education and promote lifelong learning opportunities for all\u201d).,
 
TOAEP is directly aimed at Goal 16 of the SDGs (that is, to \u201cpromote peaceful and inclusive societies for sustainable development, provide access to justice for all and build effective, accountable and inclusive institutions at all levels\u201d). By publishing open access international law information, including on international criminal law, TOAEP aims to equip individuals with the knowledge required to ensure that there is accountability for core international crimes in their societies, organisations and countries."
        },