CAIDA / catalog-data

Repo which holds some panda solutions and papers
3 stars 6 forks source link

doi field is now case insensitive #714

Closed Akshat30 closed 8 months ago

Akshat30 commented 8 months ago

Before merging:

Issue

Before, when the doi field was case sensitive, part of the output for a given paper with the link associated with doi instead of DOI in the id_object.json file was as follows:

"access": [
            {
                "access": "public",
                "url": "https://doi.org/10.1145/3618257.3624838",
                "type": "doi"
            },
            {
                "access": "public",
                "url": "https://www.caida.org/catalog/papers/2023_coarse_grained_inference_bgp/coarse_grained_inference_bgp.pdf",
                "type": "PDF"
            }
        ],

The doi associated url should be its own field outside of the access array.

Fix

After making the script check for DOI regardless of case (using .upper() method), the output for a given paper, where the doi field is not fully uppercase, was correct:

"doi": "https://doi.org/10.1145/3618257.3624838",
"access": [
    {
        "access": "public",
        "url": "https://www.caida.org/catalog/papers/2023_coarse_grained_inference_bgp/coarse_grained_inference_bgp.pdf",
        "type": "PDF"
    }
],

Notes