DPGAlliance / publicgoods-scripts

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

Added conditions for when json properties are missing #152

Closed nathanfletcher closed 1 year ago

nathanfletcher commented 1 year ago

A number of properties for a particular entry coming from the API were missing. This caused the registry table not to render. As such conditional code has to be written to handle these edge cases

nathanfletcher commented 1 year ago

The particular entry from the API that brought this to light was

{
        "documentation": "Developer documentation: https://aam-digital.github.io/ndb-core/documentation/additional-documentation/overview.html\r\n\r\nUser documentation: https://www.youtube.com/watch?v=4wXRvkLen4s&list=PLaK5xQ55siXEqgAs_FOtnu-_soZL1E2eF\r\n\r\nAam Digital Setup: \r\nhttps://github.com/Aam-Digital/ndb-setup/",
        "sectors": [],
        "stage": "DPG",
        "privacy": [
            {
                "privacyCompliance": "Aam Digital is GDPR compliant, implementing an extensive list of Technical and Operational Measures and signing a specific data processing agreement with each client",
                "privacyComplianceURL": "https://aam-digital.com/imprint/\r\n\r\nhttps://aam-digital.com/aam-digital-gdpr-toms/\r\n\r\nhttps://aam-digital.com/aam-digital-gdpr-data-processing-agreement-sample/"
            }
        ],
        "organizations": [
            {
                "name": "OpenTeleRehab",
                "website": "https://www.opentelerehab.com",
                "org_type": "owner",
                "contact_name": " Martin Jacobs  ",
                "contact_email": "m.jacobs@hi.org"
            }
        ],
        "platformIndependence": {
            "isPlatformIndependent": "No",
            "openAlternatives": []
        },
        "openStandards": [
            "HTTPS/SSL (encrypted connection to the app are automatically forwarded and enforced)",
            "\r\n\r\nUTF-8 (data can be entered in any local language/script; translated UI is available)",
            "\r\n\r\nXLIFF (i18n translation files to make the app available in different languages; https://github.com/Aam-Digital/ndb-core/tree/master/src/locale)",
            "\r\n\r\nHTML/CSS/ECMAScript6 (Aam Digital is built using the widely adopted Angular framework and TypeScript",
            " following common web standards)",
            "\r\n\r\nREST (CouchDB as our backend/database exposes data through the REST standard)",
            "\r\n\r\nOpenAPI: our backend services provide API documentation in standard format (e.g. https://dev.aam-digital.net/db/api)\r\n\r\nJSON (backups/exports of data are available in JSON or CSV)\r\nCSV (backups/exports of data are available in JSON or CSV) https://github.com/Aam-Digital/ndb-core/tree/master/src/locale",
            "https://user-roles.aam-digital.com/db/api/ \r\n\r\n"
        ],
        "bestPractices": [
            "Principles for Digital Development - these principles are a critical guiding light for our work;\r\nAam Digital is an open source initiative co-created in close collaboration with fieldworkers and intends to make this a scalable",
            " sustainable service through its social enterprise",
            "\r\nAgile development - our roots are in modern software development and our processes loosely based on Scrum;\r\niterative development",
            " process automation and detailed user feedback are key aspects for us\r\n\r\nCI/CD - extensive automation of tests and integration of code quality analytics: https://github.com/Aam-Digital/ndb-core/tree/master/.github/workflows (or see any Pull Request on GitHub)\r\n\r\nSoftware architecture and patterns - building modular",
            " reusable",
            " isolated components is a core principle for us",
            " continuously pushed for by our core team holding computer science degrees and professional experience in software development. Reference - https://aam-digital.github.io/ndb-core/documentation/additional-documentation/concepts/overall-architecture.html",
            "\r\n\r\nMicroservices & containerization - different backend services are deployed separately and deployed as docker containers to allow easy setup. Reference - https://github.com/Aam-Digital/ndb-setup/blob/master/docker-compose.yml",
            "\r\n\r\nMaterial Design - following the design guidelines and built using the official material design components for Angular. Reference - https://github.com/Aam-Digital/ndb-core/blob/e1f94b6c3a54501df04d78289bcfb118ea37537b/package.json#L34",
            "\r\n\r\nCode style standards- prettier and tslint are integrated in our CI pipelines to automatically ensure consistent formatting",
            " following the default styles for Angular projects",
            "\r\n\r\nDocumentation",
            " on-boarding and active engagement with volunteer contributors to the Open Source project. we run weekly video call meetings and mentor contributors actively in addition to our Developer Documentation (https://aam-digital.github.io/ndb-core/documentation/additional-documentation/overview.html)",
            "\r\n\r\nOWASP & Security Audits - regular security audits and reviews also based on the most common security threats analyzed by OWASP",
            "\r\nEnforced strong passwords - the app forces users to set passwords of minimum length and complexity\r\n\r\nhttps://github.com/Aam-Digital/ndb-core\r\n(and see linked sources in the answer above)"
        ],
        "aliases": "",
        "deploymentOrganisations": "",
        "deploymentCountriesDepartments": "",
        "otherDeploymentOrganisations": "",
        "awardsReceived": "",
        "githubActivity": "",
        "dpgLink": true
    },