IATI / ckanext-iati

CKAN extension for the IATI Registry
http://iatiregistry.org
9 stars 6 forks source link

Format of the publisher download endpoint has changed #426

Closed markbrough closed 2 months ago

markbrough commented 5 months ago

Brief Description Code for IATI Codelists collects codelists from a range of different sources and makes them available through a simple publicly-accessible interface. It is used to power a number of different services and tools, including Datastore Classic and CDFD.

One codelist, ReportingOrganisation, replicates the list of Publishers on the IATI Registry. It also makes publisher names available in a number of other languages (EN, FR, ES, PT). There is a scraper which accesses the following endpoint, and then puts the data into the IATI Codelist XML format:

https://iatiregistry.org/publisher/download/json

The format of this endpoint has changed. Previously, the organisation type and country were output as the labels. Now they are output as the codes.

For example, this data:

{
    "Publisher": "Australia - Department of  Foreign Affairs and Trade",
    "IATI Organisation Identifier": "AU-5",
    "Organization Type": "10",
    "HQ Country or Region": "AU",
    "Datasets Count": 173,
    "Datasets Link": "https://iatiregistry.org/publisher/ausgov"
}

Was previously output as:

{
    "Publisher": "Australia - Department of  Foreign Affairs and Trade",
    "IATI Organisation Identifier": "AU-5",
    "Organization Type": "Government",
    "HQ Country or Region": "Australia",
    "Datasets Count": 173,
    "Datasets Link": "https://iatiregistry.org/publisher/ausgov"
}

This change was made around 18th January -- as a result of this change, we have a large pending PR to this codelist: https://github.com/codeforIATI/Unofficial-Codelists/pull/896

Before changing the scraper to follow the new approach, I thought it would be good to check if:

Many thanks!

Severity High - no new publishers will be captured in CDFD and possibly other tools until this codelist is fixed.

Steps to Reproduce Add a list of actions needed to replicate the error. Steps to reproduce the behavior:

  1. Go to https://iatiregistry.org/publisher/download/json
  2. See that the organisation type for the first item is 10

Expected Results/Behaviour Consistent endpoint

Actual Results/Behaviour Inconsistent endpoint

robredpath commented 5 months ago

Thanks, @markbrough - this is likely related to #420 which we're reviewing the impact of now.

cormachallinanderilinx commented 5 months ago

A fix has been pushed to production. Please let me know if there are any more issues

markbrough commented 5 months ago

Looks good, thank you! The scraper has now run correctly: https://github.com/codeforIATI/Unofficial-Codelists/pull/896